
(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}
(FPCore (x y) :precision binary64 (* (/ (/ x (+ x y)) (+ x y)) (/ y (+ x (+ y 1.0)))))
double code(double x, double y) {
return ((x / (x + y)) / (x + y)) * (y / (x + (y + 1.0)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x / (x + y)) / (x + y)) * (y / (x + (y + 1.0d0)))
end function
public static double code(double x, double y) {
return ((x / (x + y)) / (x + y)) * (y / (x + (y + 1.0)));
}
def code(x, y): return ((x / (x + y)) / (x + y)) * (y / (x + (y + 1.0)))
function code(x, y) return Float64(Float64(Float64(x / Float64(x + y)) / Float64(x + y)) * Float64(y / Float64(x + Float64(y + 1.0)))) end
function tmp = code(x, y) tmp = ((x / (x + y)) / (x + y)) * (y / (x + (y + 1.0))); end
code[x_, y_] := N[(N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(y / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{x}{x + y}}{x + y} \cdot \frac{y}{x + \left(y + 1\right)}
\end{array}
Initial program 68.6%
times-frac85.6%
associate-+l+85.6%
Simplified85.6%
associate-/r*99.8%
div-inv99.7%
Applied egg-rr99.7%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ x y)))
(t_1 (* y (/ t_0 (+ x y))))
(t_2 (/ t_0 (+ y 1.0))))
(if (<= x -1.9e+15)
(/ (/ y (+ x y)) x)
(if (<= x -1.28e-23)
t_2
(if (<= x -1.4e-70)
t_1
(if (<= x -4.2e-76) (/ x (* y y)) (if (<= x -1.5e-252) t_1 t_2)))))))
double code(double x, double y) {
double t_0 = x / (x + y);
double t_1 = y * (t_0 / (x + y));
double t_2 = t_0 / (y + 1.0);
double tmp;
if (x <= -1.9e+15) {
tmp = (y / (x + y)) / x;
} else if (x <= -1.28e-23) {
tmp = t_2;
} else if (x <= -1.4e-70) {
tmp = t_1;
} else if (x <= -4.2e-76) {
tmp = x / (y * y);
} else if (x <= -1.5e-252) {
tmp = t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_0 = x / (x + y)
t_1 = y * (t_0 / (x + y))
t_2 = t_0 / (y + 1.0d0)
if (x <= (-1.9d+15)) then
tmp = (y / (x + y)) / x
else if (x <= (-1.28d-23)) then
tmp = t_2
else if (x <= (-1.4d-70)) then
tmp = t_1
else if (x <= (-4.2d-76)) then
tmp = x / (y * y)
else if (x <= (-1.5d-252)) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (x + y);
double t_1 = y * (t_0 / (x + y));
double t_2 = t_0 / (y + 1.0);
double tmp;
if (x <= -1.9e+15) {
tmp = (y / (x + y)) / x;
} else if (x <= -1.28e-23) {
tmp = t_2;
} else if (x <= -1.4e-70) {
tmp = t_1;
} else if (x <= -4.2e-76) {
tmp = x / (y * y);
} else if (x <= -1.5e-252) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y): t_0 = x / (x + y) t_1 = y * (t_0 / (x + y)) t_2 = t_0 / (y + 1.0) tmp = 0 if x <= -1.9e+15: tmp = (y / (x + y)) / x elif x <= -1.28e-23: tmp = t_2 elif x <= -1.4e-70: tmp = t_1 elif x <= -4.2e-76: tmp = x / (y * y) elif x <= -1.5e-252: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y) t_0 = Float64(x / Float64(x + y)) t_1 = Float64(y * Float64(t_0 / Float64(x + y))) t_2 = Float64(t_0 / Float64(y + 1.0)) tmp = 0.0 if (x <= -1.9e+15) tmp = Float64(Float64(y / Float64(x + y)) / x); elseif (x <= -1.28e-23) tmp = t_2; elseif (x <= -1.4e-70) tmp = t_1; elseif (x <= -4.2e-76) tmp = Float64(x / Float64(y * y)); elseif (x <= -1.5e-252) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y) t_0 = x / (x + y); t_1 = y * (t_0 / (x + y)); t_2 = t_0 / (y + 1.0); tmp = 0.0; if (x <= -1.9e+15) tmp = (y / (x + y)) / x; elseif (x <= -1.28e-23) tmp = t_2; elseif (x <= -1.4e-70) tmp = t_1; elseif (x <= -4.2e-76) tmp = x / (y * y); elseif (x <= -1.5e-252) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y * N[(t$95$0 / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.9e+15], N[(N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -1.28e-23], t$95$2, If[LessEqual[x, -1.4e-70], t$95$1, If[LessEqual[x, -4.2e-76], N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.5e-252], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{x + y}\\
t_1 := y \cdot \frac{t_0}{x + y}\\
t_2 := \frac{t_0}{y + 1}\\
\mathbf{if}\;x \leq -1.9 \cdot 10^{+15}:\\
\;\;\;\;\frac{\frac{y}{x + y}}{x}\\
\mathbf{elif}\;x \leq -1.28 \cdot 10^{-23}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -1.4 \cdot 10^{-70}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -4.2 \cdot 10^{-76}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{-252}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -1.9e15Initial program 63.5%
times-frac83.2%
associate-+l+83.2%
Simplified83.2%
frac-times63.5%
*-commutative63.5%
frac-times83.2%
clear-num83.2%
associate-/r*99.8%
frac-times99.9%
*-un-lft-identity99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 84.9%
if -1.9e15 < x < -1.28000000000000005e-23 or -1.49999999999999997e-252 < x Initial program 65.4%
times-frac84.7%
associate-+l+84.7%
Simplified84.7%
*-commutative84.7%
clear-num84.6%
associate-/r*99.7%
frac-times99.2%
*-un-lft-identity99.2%
Applied egg-rr99.2%
Taylor expanded in x around 0 55.8%
+-commutative55.8%
Simplified55.8%
if -1.28000000000000005e-23 < x < -1.4e-70 or -4.19999999999999985e-76 < x < -1.49999999999999997e-252Initial program 79.2%
times-frac89.4%
associate-+l+89.4%
Simplified89.4%
associate-/r*99.7%
div-inv99.6%
Applied egg-rr99.6%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in y around 0 88.4%
if -1.4e-70 < x < -4.19999999999999985e-76Initial program 99.6%
times-frac99.6%
associate-+l+99.6%
Simplified99.6%
associate-/r*99.6%
div-inv99.6%
Applied egg-rr99.6%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in y around inf 75.4%
unpow275.4%
Simplified75.4%
Final simplification69.4%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ x y)))
(t_1 (/ t_0 (+ y 1.0)))
(t_2 (* y (/ t_0 (+ x y)))))
(if (<= x -8.4e+15)
(/ (/ y (+ x (+ y 1.0))) (+ x y))
(if (<= x -1.6e-22)
t_1
(if (<= x -8e-70)
t_2
(if (<= x -5.1e-76) (/ x (* y y)) (if (<= x -3.3e-253) t_2 t_1)))))))
double code(double x, double y) {
double t_0 = x / (x + y);
double t_1 = t_0 / (y + 1.0);
double t_2 = y * (t_0 / (x + y));
double tmp;
if (x <= -8.4e+15) {
tmp = (y / (x + (y + 1.0))) / (x + y);
} else if (x <= -1.6e-22) {
tmp = t_1;
} else if (x <= -8e-70) {
tmp = t_2;
} else if (x <= -5.1e-76) {
tmp = x / (y * y);
} else if (x <= -3.3e-253) {
tmp = t_2;
} else {
tmp = t_1;
}
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) :: t_2
real(8) :: tmp
t_0 = x / (x + y)
t_1 = t_0 / (y + 1.0d0)
t_2 = y * (t_0 / (x + y))
if (x <= (-8.4d+15)) then
tmp = (y / (x + (y + 1.0d0))) / (x + y)
else if (x <= (-1.6d-22)) then
tmp = t_1
else if (x <= (-8d-70)) then
tmp = t_2
else if (x <= (-5.1d-76)) then
tmp = x / (y * y)
else if (x <= (-3.3d-253)) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (x + y);
double t_1 = t_0 / (y + 1.0);
double t_2 = y * (t_0 / (x + y));
double tmp;
if (x <= -8.4e+15) {
tmp = (y / (x + (y + 1.0))) / (x + y);
} else if (x <= -1.6e-22) {
tmp = t_1;
} else if (x <= -8e-70) {
tmp = t_2;
} else if (x <= -5.1e-76) {
tmp = x / (y * y);
} else if (x <= -3.3e-253) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y): t_0 = x / (x + y) t_1 = t_0 / (y + 1.0) t_2 = y * (t_0 / (x + y)) tmp = 0 if x <= -8.4e+15: tmp = (y / (x + (y + 1.0))) / (x + y) elif x <= -1.6e-22: tmp = t_1 elif x <= -8e-70: tmp = t_2 elif x <= -5.1e-76: tmp = x / (y * y) elif x <= -3.3e-253: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y) t_0 = Float64(x / Float64(x + y)) t_1 = Float64(t_0 / Float64(y + 1.0)) t_2 = Float64(y * Float64(t_0 / Float64(x + y))) tmp = 0.0 if (x <= -8.4e+15) tmp = Float64(Float64(y / Float64(x + Float64(y + 1.0))) / Float64(x + y)); elseif (x <= -1.6e-22) tmp = t_1; elseif (x <= -8e-70) tmp = t_2; elseif (x <= -5.1e-76) tmp = Float64(x / Float64(y * y)); elseif (x <= -3.3e-253) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y) t_0 = x / (x + y); t_1 = t_0 / (y + 1.0); t_2 = y * (t_0 / (x + y)); tmp = 0.0; if (x <= -8.4e+15) tmp = (y / (x + (y + 1.0))) / (x + y); elseif (x <= -1.6e-22) tmp = t_1; elseif (x <= -8e-70) tmp = t_2; elseif (x <= -5.1e-76) tmp = x / (y * y); elseif (x <= -3.3e-253) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(t$95$0 / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.4e+15], N[(N[(y / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.6e-22], t$95$1, If[LessEqual[x, -8e-70], t$95$2, If[LessEqual[x, -5.1e-76], N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.3e-253], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{x + y}\\
t_1 := \frac{t_0}{y + 1}\\
t_2 := y \cdot \frac{t_0}{x + y}\\
\mathbf{if}\;x \leq -8.4 \cdot 10^{+15}:\\
\;\;\;\;\frac{\frac{y}{x + \left(y + 1\right)}}{x + y}\\
\mathbf{elif}\;x \leq -1.6 \cdot 10^{-22}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -8 \cdot 10^{-70}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -5.1 \cdot 10^{-76}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\mathbf{elif}\;x \leq -3.3 \cdot 10^{-253}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -8.4e15Initial program 63.5%
times-frac83.2%
associate-+l+83.2%
Simplified83.2%
*-commutative83.2%
clear-num83.2%
associate-/r*99.8%
frac-times98.6%
*-un-lft-identity98.6%
Applied egg-rr98.6%
Taylor expanded in x around inf 84.2%
expm1-log1p-u84.2%
expm1-udef63.8%
associate-/r*63.8%
clear-num63.8%
+-commutative63.8%
Applied egg-rr63.8%
expm1-def85.5%
expm1-log1p85.5%
Simplified85.5%
if -8.4e15 < x < -1.59999999999999994e-22 or -3.3000000000000001e-253 < x Initial program 65.4%
times-frac84.7%
associate-+l+84.7%
Simplified84.7%
*-commutative84.7%
clear-num84.6%
associate-/r*99.7%
frac-times99.2%
*-un-lft-identity99.2%
Applied egg-rr99.2%
Taylor expanded in x around 0 55.8%
+-commutative55.8%
Simplified55.8%
if -1.59999999999999994e-22 < x < -7.99999999999999997e-70 or -5.09999999999999986e-76 < x < -3.3000000000000001e-253Initial program 79.2%
times-frac89.4%
associate-+l+89.4%
Simplified89.4%
associate-/r*99.7%
div-inv99.6%
Applied egg-rr99.6%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in y around 0 88.4%
if -7.99999999999999997e-70 < x < -5.09999999999999986e-76Initial program 99.6%
times-frac99.6%
associate-+l+99.6%
Simplified99.6%
associate-/r*99.6%
div-inv99.6%
Applied egg-rr99.6%
associate-*r/99.6%
*-rgt-identity99.6%
Simplified99.6%
Taylor expanded in y around inf 75.4%
unpow275.4%
Simplified75.4%
Final simplification69.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (/ x (+ x y)) (+ x y))))
(if (<= x -5e+165)
(* t_0 (/ y x))
(if (<= x -5e-20)
(* (/ y (+ x (+ y 1.0))) (/ x (* (+ x y) (+ x y))))
(* t_0 (/ y (+ y 1.0)))))))
double code(double x, double y) {
double t_0 = (x / (x + y)) / (x + y);
double tmp;
if (x <= -5e+165) {
tmp = t_0 * (y / x);
} else if (x <= -5e-20) {
tmp = (y / (x + (y + 1.0))) * (x / ((x + y) * (x + y)));
} else {
tmp = t_0 * (y / (y + 1.0));
}
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 / (x + y)) / (x + y)
if (x <= (-5d+165)) then
tmp = t_0 * (y / x)
else if (x <= (-5d-20)) then
tmp = (y / (x + (y + 1.0d0))) * (x / ((x + y) * (x + y)))
else
tmp = t_0 * (y / (y + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (x / (x + y)) / (x + y);
double tmp;
if (x <= -5e+165) {
tmp = t_0 * (y / x);
} else if (x <= -5e-20) {
tmp = (y / (x + (y + 1.0))) * (x / ((x + y) * (x + y)));
} else {
tmp = t_0 * (y / (y + 1.0));
}
return tmp;
}
def code(x, y): t_0 = (x / (x + y)) / (x + y) tmp = 0 if x <= -5e+165: tmp = t_0 * (y / x) elif x <= -5e-20: tmp = (y / (x + (y + 1.0))) * (x / ((x + y) * (x + y))) else: tmp = t_0 * (y / (y + 1.0)) return tmp
function code(x, y) t_0 = Float64(Float64(x / Float64(x + y)) / Float64(x + y)) tmp = 0.0 if (x <= -5e+165) tmp = Float64(t_0 * Float64(y / x)); elseif (x <= -5e-20) tmp = Float64(Float64(y / Float64(x + Float64(y + 1.0))) * Float64(x / Float64(Float64(x + y) * Float64(x + y)))); else tmp = Float64(t_0 * Float64(y / Float64(y + 1.0))); end return tmp end
function tmp_2 = code(x, y) t_0 = (x / (x + y)) / (x + y); tmp = 0.0; if (x <= -5e+165) tmp = t_0 * (y / x); elseif (x <= -5e-20) tmp = (y / (x + (y + 1.0))) * (x / ((x + y) * (x + y))); else tmp = t_0 * (y / (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5e+165], N[(t$95$0 * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5e-20], N[(N[(y / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{x}{x + y}}{x + y}\\
\mathbf{if}\;x \leq -5 \cdot 10^{+165}:\\
\;\;\;\;t_0 \cdot \frac{y}{x}\\
\mathbf{elif}\;x \leq -5 \cdot 10^{-20}:\\
\;\;\;\;\frac{y}{x + \left(y + 1\right)} \cdot \frac{x}{\left(x + y\right) \cdot \left(x + y\right)}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \frac{y}{y + 1}\\
\end{array}
\end{array}
if x < -4.9999999999999997e165Initial program 59.8%
times-frac78.9%
associate-+l+78.9%
Simplified78.9%
associate-/r*99.9%
div-inv99.9%
Applied egg-rr99.9%
associate-*r/99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in x around inf 99.7%
if -4.9999999999999997e165 < x < -4.9999999999999999e-20Initial program 70.1%
times-frac91.9%
associate-+l+91.9%
Simplified91.9%
if -4.9999999999999999e-20 < x Initial program 69.7%
times-frac85.5%
associate-+l+85.5%
Simplified85.5%
associate-/r*99.7%
div-inv99.7%
Applied egg-rr99.7%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in x around 0 84.6%
+-commutative84.6%
Simplified84.6%
Final simplification87.3%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (/ x (+ x y)) (+ x y))))
(if (<= x -5e+165)
(* t_0 (/ y x))
(if (<= x -2e-45)
(* (/ y (* (+ x y) (+ x y))) (/ x (+ x (+ y 1.0))))
(* t_0 (/ y (+ y 1.0)))))))
double code(double x, double y) {
double t_0 = (x / (x + y)) / (x + y);
double tmp;
if (x <= -5e+165) {
tmp = t_0 * (y / x);
} else if (x <= -2e-45) {
tmp = (y / ((x + y) * (x + y))) * (x / (x + (y + 1.0)));
} else {
tmp = t_0 * (y / (y + 1.0));
}
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 / (x + y)) / (x + y)
if (x <= (-5d+165)) then
tmp = t_0 * (y / x)
else if (x <= (-2d-45)) then
tmp = (y / ((x + y) * (x + y))) * (x / (x + (y + 1.0d0)))
else
tmp = t_0 * (y / (y + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (x / (x + y)) / (x + y);
double tmp;
if (x <= -5e+165) {
tmp = t_0 * (y / x);
} else if (x <= -2e-45) {
tmp = (y / ((x + y) * (x + y))) * (x / (x + (y + 1.0)));
} else {
tmp = t_0 * (y / (y + 1.0));
}
return tmp;
}
def code(x, y): t_0 = (x / (x + y)) / (x + y) tmp = 0 if x <= -5e+165: tmp = t_0 * (y / x) elif x <= -2e-45: tmp = (y / ((x + y) * (x + y))) * (x / (x + (y + 1.0))) else: tmp = t_0 * (y / (y + 1.0)) return tmp
function code(x, y) t_0 = Float64(Float64(x / Float64(x + y)) / Float64(x + y)) tmp = 0.0 if (x <= -5e+165) tmp = Float64(t_0 * Float64(y / x)); elseif (x <= -2e-45) tmp = Float64(Float64(y / Float64(Float64(x + y) * Float64(x + y))) * Float64(x / Float64(x + Float64(y + 1.0)))); else tmp = Float64(t_0 * Float64(y / Float64(y + 1.0))); end return tmp end
function tmp_2 = code(x, y) t_0 = (x / (x + y)) / (x + y); tmp = 0.0; if (x <= -5e+165) tmp = t_0 * (y / x); elseif (x <= -2e-45) tmp = (y / ((x + y) * (x + y))) * (x / (x + (y + 1.0))); else tmp = t_0 * (y / (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5e+165], N[(t$95$0 * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2e-45], N[(N[(y / N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{x}{x + y}}{x + y}\\
\mathbf{if}\;x \leq -5 \cdot 10^{+165}:\\
\;\;\;\;t_0 \cdot \frac{y}{x}\\
\mathbf{elif}\;x \leq -2 \cdot 10^{-45}:\\
\;\;\;\;\frac{y}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \frac{y}{y + 1}\\
\end{array}
\end{array}
if x < -4.9999999999999997e165Initial program 59.8%
times-frac78.9%
associate-+l+78.9%
Simplified78.9%
associate-/r*99.9%
div-inv99.9%
Applied egg-rr99.9%
associate-*r/99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in x around inf 99.7%
if -4.9999999999999997e165 < x < -1.99999999999999997e-45Initial program 70.7%
associate-/r*84.8%
+-commutative84.8%
+-commutative84.8%
+-commutative84.8%
associate-/l/70.7%
times-frac92.7%
*-commutative92.7%
+-commutative92.7%
+-commutative92.7%
+-commutative92.7%
associate-+l+92.7%
Simplified92.7%
if -1.99999999999999997e-45 < x Initial program 69.5%
times-frac85.2%
associate-+l+85.2%
Simplified85.2%
associate-/r*99.8%
div-inv99.7%
Applied egg-rr99.7%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
Taylor expanded in x around 0 84.3%
+-commutative84.3%
Simplified84.3%
Final simplification87.4%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ x y))) (t_1 (/ t_0 (+ x y))))
(if (<= x -85000000000000.0)
(* t_1 (/ y x))
(if (<= x -6.5e-161)
(* (/ y (+ y 1.0)) (/ x (* (+ x y) (+ x y))))
(if (<= x -5.5e-253) (* y t_1) (/ t_0 (+ y (- x (- -1.0 x)))))))))
double code(double x, double y) {
double t_0 = x / (x + y);
double t_1 = t_0 / (x + y);
double tmp;
if (x <= -85000000000000.0) {
tmp = t_1 * (y / x);
} else if (x <= -6.5e-161) {
tmp = (y / (y + 1.0)) * (x / ((x + y) * (x + y)));
} else if (x <= -5.5e-253) {
tmp = y * t_1;
} else {
tmp = t_0 / (y + (x - (-1.0 - x)));
}
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 = x / (x + y)
t_1 = t_0 / (x + y)
if (x <= (-85000000000000.0d0)) then
tmp = t_1 * (y / x)
else if (x <= (-6.5d-161)) then
tmp = (y / (y + 1.0d0)) * (x / ((x + y) * (x + y)))
else if (x <= (-5.5d-253)) then
tmp = y * t_1
else
tmp = t_0 / (y + (x - ((-1.0d0) - x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (x + y);
double t_1 = t_0 / (x + y);
double tmp;
if (x <= -85000000000000.0) {
tmp = t_1 * (y / x);
} else if (x <= -6.5e-161) {
tmp = (y / (y + 1.0)) * (x / ((x + y) * (x + y)));
} else if (x <= -5.5e-253) {
tmp = y * t_1;
} else {
tmp = t_0 / (y + (x - (-1.0 - x)));
}
return tmp;
}
def code(x, y): t_0 = x / (x + y) t_1 = t_0 / (x + y) tmp = 0 if x <= -85000000000000.0: tmp = t_1 * (y / x) elif x <= -6.5e-161: tmp = (y / (y + 1.0)) * (x / ((x + y) * (x + y))) elif x <= -5.5e-253: tmp = y * t_1 else: tmp = t_0 / (y + (x - (-1.0 - x))) return tmp
function code(x, y) t_0 = Float64(x / Float64(x + y)) t_1 = Float64(t_0 / Float64(x + y)) tmp = 0.0 if (x <= -85000000000000.0) tmp = Float64(t_1 * Float64(y / x)); elseif (x <= -6.5e-161) tmp = Float64(Float64(y / Float64(y + 1.0)) * Float64(x / Float64(Float64(x + y) * Float64(x + y)))); elseif (x <= -5.5e-253) tmp = Float64(y * t_1); else tmp = Float64(t_0 / Float64(y + Float64(x - Float64(-1.0 - x)))); end return tmp end
function tmp_2 = code(x, y) t_0 = x / (x + y); t_1 = t_0 / (x + y); tmp = 0.0; if (x <= -85000000000000.0) tmp = t_1 * (y / x); elseif (x <= -6.5e-161) tmp = (y / (y + 1.0)) * (x / ((x + y) * (x + y))); elseif (x <= -5.5e-253) tmp = y * t_1; else tmp = t_0 / (y + (x - (-1.0 - x))); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 / N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -85000000000000.0], N[(t$95$1 * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.5e-161], N[(N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] * N[(x / N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.5e-253], N[(y * t$95$1), $MachinePrecision], N[(t$95$0 / N[(y + N[(x - N[(-1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{x + y}\\
t_1 := \frac{t_0}{x + y}\\
\mathbf{if}\;x \leq -85000000000000:\\
\;\;\;\;t_1 \cdot \frac{y}{x}\\
\mathbf{elif}\;x \leq -6.5 \cdot 10^{-161}:\\
\;\;\;\;\frac{y}{y + 1} \cdot \frac{x}{\left(x + y\right) \cdot \left(x + y\right)}\\
\mathbf{elif}\;x \leq -5.5 \cdot 10^{-253}:\\
\;\;\;\;y \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{y + \left(x - \left(-1 - x\right)\right)}\\
\end{array}
\end{array}
if x < -8.5e13Initial program 63.5%
times-frac83.2%
associate-+l+83.2%
Simplified83.2%
associate-/r*99.9%
div-inv99.8%
Applied egg-rr99.8%
associate-*r/99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in x around inf 94.1%
if -8.5e13 < x < -6.50000000000000008e-161Initial program 84.5%
times-frac99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in x around 0 98.2%
+-commutative98.2%
Simplified98.2%
if -6.50000000000000008e-161 < x < -5.49999999999999974e-253Initial program 71.6%
times-frac78.2%
associate-+l+78.2%
Simplified78.2%
associate-/r*100.0%
div-inv99.9%
Applied egg-rr99.9%
associate-*r/100.0%
*-rgt-identity100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in y around 0 95.3%
if -5.49999999999999974e-253 < x Initial program 64.6%
times-frac83.4%
associate-+l+83.4%
Simplified83.4%
*-commutative83.4%
clear-num83.3%
associate-/r*99.7%
frac-times99.1%
*-un-lft-identity99.1%
Applied egg-rr99.1%
Taylor expanded in y around -inf 53.8%
mul-1-neg53.8%
unsub-neg53.8%
neg-mul-153.8%
+-commutative53.8%
unsub-neg53.8%
distribute-lft-in53.8%
metadata-eval53.8%
neg-mul-153.8%
unsub-neg53.8%
Simplified53.8%
Final simplification74.3%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ x y))))
(if (<= x -6.8e+174)
(/ (/ y (+ x (+ y 1.0))) (+ x y))
(if (<= x -2500000.0)
(* (/ y x) (/ x (* (+ x y) (+ x y))))
(if (<= x -5e-258) (* y (/ t_0 (+ x y))) (/ t_0 (+ y 1.0)))))))
double code(double x, double y) {
double t_0 = x / (x + y);
double tmp;
if (x <= -6.8e+174) {
tmp = (y / (x + (y + 1.0))) / (x + y);
} else if (x <= -2500000.0) {
tmp = (y / x) * (x / ((x + y) * (x + y)));
} else if (x <= -5e-258) {
tmp = y * (t_0 / (x + y));
} else {
tmp = t_0 / (y + 1.0);
}
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 / (x + y)
if (x <= (-6.8d+174)) then
tmp = (y / (x + (y + 1.0d0))) / (x + y)
else if (x <= (-2500000.0d0)) then
tmp = (y / x) * (x / ((x + y) * (x + y)))
else if (x <= (-5d-258)) then
tmp = y * (t_0 / (x + y))
else
tmp = t_0 / (y + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (x + y);
double tmp;
if (x <= -6.8e+174) {
tmp = (y / (x + (y + 1.0))) / (x + y);
} else if (x <= -2500000.0) {
tmp = (y / x) * (x / ((x + y) * (x + y)));
} else if (x <= -5e-258) {
tmp = y * (t_0 / (x + y));
} else {
tmp = t_0 / (y + 1.0);
}
return tmp;
}
def code(x, y): t_0 = x / (x + y) tmp = 0 if x <= -6.8e+174: tmp = (y / (x + (y + 1.0))) / (x + y) elif x <= -2500000.0: tmp = (y / x) * (x / ((x + y) * (x + y))) elif x <= -5e-258: tmp = y * (t_0 / (x + y)) else: tmp = t_0 / (y + 1.0) return tmp
function code(x, y) t_0 = Float64(x / Float64(x + y)) tmp = 0.0 if (x <= -6.8e+174) tmp = Float64(Float64(y / Float64(x + Float64(y + 1.0))) / Float64(x + y)); elseif (x <= -2500000.0) tmp = Float64(Float64(y / x) * Float64(x / Float64(Float64(x + y) * Float64(x + y)))); elseif (x <= -5e-258) tmp = Float64(y * Float64(t_0 / Float64(x + y))); else tmp = Float64(t_0 / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) t_0 = x / (x + y); tmp = 0.0; if (x <= -6.8e+174) tmp = (y / (x + (y + 1.0))) / (x + y); elseif (x <= -2500000.0) tmp = (y / x) * (x / ((x + y) * (x + y))); elseif (x <= -5e-258) tmp = y * (t_0 / (x + y)); else tmp = t_0 / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.8e+174], N[(N[(y / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2500000.0], N[(N[(y / x), $MachinePrecision] * N[(x / N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5e-258], N[(y * N[(t$95$0 / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{x + y}\\
\mathbf{if}\;x \leq -6.8 \cdot 10^{+174}:\\
\;\;\;\;\frac{\frac{y}{x + \left(y + 1\right)}}{x + y}\\
\mathbf{elif}\;x \leq -2500000:\\
\;\;\;\;\frac{y}{x} \cdot \frac{x}{\left(x + y\right) \cdot \left(x + y\right)}\\
\mathbf{elif}\;x \leq -5 \cdot 10^{-258}:\\
\;\;\;\;y \cdot \frac{t_0}{x + y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{y + 1}\\
\end{array}
\end{array}
if x < -6.8000000000000002e174Initial program 62.5%
times-frac80.0%
associate-+l+80.0%
Simplified80.0%
*-commutative80.0%
clear-num80.0%
associate-/r*99.9%
frac-times97.2%
*-un-lft-identity97.2%
Applied egg-rr97.2%
Taylor expanded in x around inf 97.0%
expm1-log1p-u97.0%
expm1-udef80.0%
associate-/r*80.0%
clear-num80.0%
+-commutative80.0%
Applied egg-rr80.0%
expm1-def99.7%
expm1-log1p99.7%
Simplified99.7%
if -6.8000000000000002e174 < x < -2.5e6Initial program 63.8%
times-frac87.1%
associate-+l+87.1%
Simplified87.1%
Taylor expanded in x around inf 83.3%
if -2.5e6 < x < -4.9999999999999999e-258Initial program 79.2%
times-frac90.1%
associate-+l+90.1%
Simplified90.1%
associate-/r*99.7%
div-inv99.7%
Applied egg-rr99.7%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in x around 0 98.8%
+-commutative98.8%
Simplified98.8%
Taylor expanded in y around 0 84.5%
if -4.9999999999999999e-258 < x Initial program 65.1%
times-frac84.0%
associate-+l+84.0%
Simplified84.0%
*-commutative84.0%
clear-num83.9%
associate-/r*99.7%
frac-times99.1%
*-un-lft-identity99.1%
Applied egg-rr99.1%
Taylor expanded in x around 0 52.8%
+-commutative52.8%
Simplified52.8%
Final simplification69.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ x y))) (t_1 (/ t_0 (+ x y))))
(if (<= x -2500000.0)
(* t_1 (/ y x))
(if (<= x -1.45e-255) (* y t_1) (/ t_0 (+ y (- x (- -1.0 x))))))))
double code(double x, double y) {
double t_0 = x / (x + y);
double t_1 = t_0 / (x + y);
double tmp;
if (x <= -2500000.0) {
tmp = t_1 * (y / x);
} else if (x <= -1.45e-255) {
tmp = y * t_1;
} else {
tmp = t_0 / (y + (x - (-1.0 - x)));
}
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 = x / (x + y)
t_1 = t_0 / (x + y)
if (x <= (-2500000.0d0)) then
tmp = t_1 * (y / x)
else if (x <= (-1.45d-255)) then
tmp = y * t_1
else
tmp = t_0 / (y + (x - ((-1.0d0) - x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (x + y);
double t_1 = t_0 / (x + y);
double tmp;
if (x <= -2500000.0) {
tmp = t_1 * (y / x);
} else if (x <= -1.45e-255) {
tmp = y * t_1;
} else {
tmp = t_0 / (y + (x - (-1.0 - x)));
}
return tmp;
}
def code(x, y): t_0 = x / (x + y) t_1 = t_0 / (x + y) tmp = 0 if x <= -2500000.0: tmp = t_1 * (y / x) elif x <= -1.45e-255: tmp = y * t_1 else: tmp = t_0 / (y + (x - (-1.0 - x))) return tmp
function code(x, y) t_0 = Float64(x / Float64(x + y)) t_1 = Float64(t_0 / Float64(x + y)) tmp = 0.0 if (x <= -2500000.0) tmp = Float64(t_1 * Float64(y / x)); elseif (x <= -1.45e-255) tmp = Float64(y * t_1); else tmp = Float64(t_0 / Float64(y + Float64(x - Float64(-1.0 - x)))); end return tmp end
function tmp_2 = code(x, y) t_0 = x / (x + y); t_1 = t_0 / (x + y); tmp = 0.0; if (x <= -2500000.0) tmp = t_1 * (y / x); elseif (x <= -1.45e-255) tmp = y * t_1; else tmp = t_0 / (y + (x - (-1.0 - x))); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 / N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2500000.0], N[(t$95$1 * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.45e-255], N[(y * t$95$1), $MachinePrecision], N[(t$95$0 / N[(y + N[(x - N[(-1.0 - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{x + y}\\
t_1 := \frac{t_0}{x + y}\\
\mathbf{if}\;x \leq -2500000:\\
\;\;\;\;t_1 \cdot \frac{y}{x}\\
\mathbf{elif}\;x \leq -1.45 \cdot 10^{-255}:\\
\;\;\;\;y \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{y + \left(x - \left(-1 - x\right)\right)}\\
\end{array}
\end{array}
if x < -2.5e6Initial program 63.2%
times-frac83.8%
associate-+l+83.8%
Simplified83.8%
associate-/r*99.9%
div-inv99.8%
Applied egg-rr99.8%
associate-*r/99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in x around inf 92.5%
if -2.5e6 < x < -1.45000000000000003e-255Initial program 80.4%
times-frac91.3%
associate-+l+91.3%
Simplified91.3%
associate-/r*99.7%
div-inv99.7%
Applied egg-rr99.7%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in x around 0 98.8%
+-commutative98.8%
Simplified98.8%
Taylor expanded in y around 0 84.2%
if -1.45000000000000003e-255 < x Initial program 64.6%
times-frac83.4%
associate-+l+83.4%
Simplified83.4%
*-commutative83.4%
clear-num83.3%
associate-/r*99.7%
frac-times99.1%
*-un-lft-identity99.1%
Applied egg-rr99.1%
Taylor expanded in y around -inf 53.8%
mul-1-neg53.8%
unsub-neg53.8%
neg-mul-153.8%
+-commutative53.8%
unsub-neg53.8%
distribute-lft-in53.8%
metadata-eval53.8%
neg-mul-153.8%
unsub-neg53.8%
Simplified53.8%
Final simplification70.5%
(FPCore (x y) :precision binary64 (let* ((t_0 (/ (/ x (+ x y)) (+ x y)))) (if (<= x -3.6e+14) (* t_0 (/ y x)) (* t_0 (/ y (+ y 1.0))))))
double code(double x, double y) {
double t_0 = (x / (x + y)) / (x + y);
double tmp;
if (x <= -3.6e+14) {
tmp = t_0 * (y / x);
} else {
tmp = t_0 * (y / (y + 1.0));
}
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 / (x + y)) / (x + y)
if (x <= (-3.6d+14)) then
tmp = t_0 * (y / x)
else
tmp = t_0 * (y / (y + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (x / (x + y)) / (x + y);
double tmp;
if (x <= -3.6e+14) {
tmp = t_0 * (y / x);
} else {
tmp = t_0 * (y / (y + 1.0));
}
return tmp;
}
def code(x, y): t_0 = (x / (x + y)) / (x + y) tmp = 0 if x <= -3.6e+14: tmp = t_0 * (y / x) else: tmp = t_0 * (y / (y + 1.0)) return tmp
function code(x, y) t_0 = Float64(Float64(x / Float64(x + y)) / Float64(x + y)) tmp = 0.0 if (x <= -3.6e+14) tmp = Float64(t_0 * Float64(y / x)); else tmp = Float64(t_0 * Float64(y / Float64(y + 1.0))); end return tmp end
function tmp_2 = code(x, y) t_0 = (x / (x + y)) / (x + y); tmp = 0.0; if (x <= -3.6e+14) tmp = t_0 * (y / x); else tmp = t_0 * (y / (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.6e+14], N[(t$95$0 * N[(y / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{x}{x + y}}{x + y}\\
\mathbf{if}\;x \leq -3.6 \cdot 10^{+14}:\\
\;\;\;\;t_0 \cdot \frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;t_0 \cdot \frac{y}{y + 1}\\
\end{array}
\end{array}
if x < -3.6e14Initial program 63.5%
times-frac83.2%
associate-+l+83.2%
Simplified83.2%
associate-/r*99.9%
div-inv99.8%
Applied egg-rr99.8%
associate-*r/99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in x around inf 94.1%
if -3.6e14 < x Initial program 69.9%
times-frac86.3%
associate-+l+86.3%
Simplified86.3%
associate-/r*99.8%
div-inv99.7%
Applied egg-rr99.7%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
Taylor expanded in x around 0 85.2%
+-commutative85.2%
Simplified85.2%
Final simplification87.0%
(FPCore (x y)
:precision binary64
(if (<= x -1.65e+14)
(/ y (* x x))
(if (<= x -7.5e-23)
(/ x (* y y))
(if (<= x -4e-137)
(/ y x)
(if (<= x 4.6e-179) (/ 1.0 (/ y x)) (/ 1.0 (* y (/ y x))))))))
double code(double x, double y) {
double tmp;
if (x <= -1.65e+14) {
tmp = y / (x * x);
} else if (x <= -7.5e-23) {
tmp = x / (y * y);
} else if (x <= -4e-137) {
tmp = y / x;
} else if (x <= 4.6e-179) {
tmp = 1.0 / (y / x);
} else {
tmp = 1.0 / (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 <= (-1.65d+14)) then
tmp = y / (x * x)
else if (x <= (-7.5d-23)) then
tmp = x / (y * y)
else if (x <= (-4d-137)) then
tmp = y / x
else if (x <= 4.6d-179) then
tmp = 1.0d0 / (y / x)
else
tmp = 1.0d0 / (y * (y / x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.65e+14) {
tmp = y / (x * x);
} else if (x <= -7.5e-23) {
tmp = x / (y * y);
} else if (x <= -4e-137) {
tmp = y / x;
} else if (x <= 4.6e-179) {
tmp = 1.0 / (y / x);
} else {
tmp = 1.0 / (y * (y / x));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.65e+14: tmp = y / (x * x) elif x <= -7.5e-23: tmp = x / (y * y) elif x <= -4e-137: tmp = y / x elif x <= 4.6e-179: tmp = 1.0 / (y / x) else: tmp = 1.0 / (y * (y / x)) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.65e+14) tmp = Float64(y / Float64(x * x)); elseif (x <= -7.5e-23) tmp = Float64(x / Float64(y * y)); elseif (x <= -4e-137) tmp = Float64(y / x); elseif (x <= 4.6e-179) tmp = Float64(1.0 / Float64(y / x)); else tmp = Float64(1.0 / Float64(y * Float64(y / x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.65e+14) tmp = y / (x * x); elseif (x <= -7.5e-23) tmp = x / (y * y); elseif (x <= -4e-137) tmp = y / x; elseif (x <= 4.6e-179) tmp = 1.0 / (y / x); else tmp = 1.0 / (y * (y / x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.65e+14], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -7.5e-23], N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4e-137], N[(y / x), $MachinePrecision], If[LessEqual[x, 4.6e-179], N[(1.0 / N[(y / x), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(y * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.65 \cdot 10^{+14}:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{-23}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\mathbf{elif}\;x \leq -4 \cdot 10^{-137}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;x \leq 4.6 \cdot 10^{-179}:\\
\;\;\;\;\frac{1}{\frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y \cdot \frac{y}{x}}\\
\end{array}
\end{array}
if x < -1.65e14Initial program 63.5%
times-frac83.2%
associate-+l+83.2%
Simplified83.2%
Taylor expanded in x around inf 75.2%
unpow275.2%
Simplified75.2%
if -1.65e14 < x < -7.4999999999999998e-23Initial program 74.5%
times-frac99.7%
associate-+l+99.7%
Simplified99.7%
associate-/r*99.9%
div-inv99.7%
Applied egg-rr99.7%
associate-*r/99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in y around inf 90.7%
unpow290.7%
Simplified90.7%
if -7.4999999999999998e-23 < x < -3.99999999999999991e-137Initial program 86.1%
times-frac99.5%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in y around 0 45.1%
associate-/r*45.1%
+-commutative45.1%
Simplified45.1%
Taylor expanded in x around 0 45.1%
if -3.99999999999999991e-137 < x < 4.59999999999999975e-179Initial program 64.2%
times-frac71.2%
associate-+l+71.2%
Simplified71.2%
Taylor expanded in x around 0 83.6%
associate-/r*83.6%
+-commutative83.6%
Simplified83.6%
clear-num82.5%
inv-pow82.5%
div-inv82.5%
clear-num82.5%
Applied egg-rr82.5%
unpow-182.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in y around 0 73.3%
if 4.59999999999999975e-179 < x Initial program 68.4%
times-frac91.4%
associate-+l+91.4%
Simplified91.4%
Taylor expanded in x around 0 40.7%
associate-/r*41.4%
+-commutative41.4%
Simplified41.4%
clear-num40.7%
inv-pow40.6%
div-inv40.6%
clear-num40.6%
Applied egg-rr40.6%
unpow-140.7%
*-commutative40.7%
Simplified40.7%
Taylor expanded in y around inf 37.9%
unpow237.9%
associate-*l/37.9%
*-commutative37.9%
Simplified37.9%
Final simplification58.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ x y))) (t_1 (/ t_0 (+ x y))))
(if (<= x -2500000.0)
(* t_1 (/ y x))
(if (<= x -5.4e-252) (* y t_1) (/ t_0 (+ y 1.0))))))
double code(double x, double y) {
double t_0 = x / (x + y);
double t_1 = t_0 / (x + y);
double tmp;
if (x <= -2500000.0) {
tmp = t_1 * (y / x);
} else if (x <= -5.4e-252) {
tmp = y * t_1;
} else {
tmp = t_0 / (y + 1.0);
}
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 = x / (x + y)
t_1 = t_0 / (x + y)
if (x <= (-2500000.0d0)) then
tmp = t_1 * (y / x)
else if (x <= (-5.4d-252)) then
tmp = y * t_1
else
tmp = t_0 / (y + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (x + y);
double t_1 = t_0 / (x + y);
double tmp;
if (x <= -2500000.0) {
tmp = t_1 * (y / x);
} else if (x <= -5.4e-252) {
tmp = y * t_1;
} else {
tmp = t_0 / (y + 1.0);
}
return tmp;
}
def code(x, y): t_0 = x / (x + y) t_1 = t_0 / (x + y) tmp = 0 if x <= -2500000.0: tmp = t_1 * (y / x) elif x <= -5.4e-252: tmp = y * t_1 else: tmp = t_0 / (y + 1.0) return tmp
function code(x, y) t_0 = Float64(x / Float64(x + y)) t_1 = Float64(t_0 / Float64(x + y)) tmp = 0.0 if (x <= -2500000.0) tmp = Float64(t_1 * Float64(y / x)); elseif (x <= -5.4e-252) tmp = Float64(y * t_1); else tmp = Float64(t_0 / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) t_0 = x / (x + y); t_1 = t_0 / (x + y); tmp = 0.0; if (x <= -2500000.0) tmp = t_1 * (y / x); elseif (x <= -5.4e-252) tmp = y * t_1; else tmp = t_0 / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 / N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2500000.0], N[(t$95$1 * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.4e-252], N[(y * t$95$1), $MachinePrecision], N[(t$95$0 / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{x + y}\\
t_1 := \frac{t_0}{x + y}\\
\mathbf{if}\;x \leq -2500000:\\
\;\;\;\;t_1 \cdot \frac{y}{x}\\
\mathbf{elif}\;x \leq -5.4 \cdot 10^{-252}:\\
\;\;\;\;y \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{y + 1}\\
\end{array}
\end{array}
if x < -2.5e6Initial program 63.2%
times-frac83.8%
associate-+l+83.8%
Simplified83.8%
associate-/r*99.9%
div-inv99.8%
Applied egg-rr99.8%
associate-*r/99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in x around inf 92.5%
if -2.5e6 < x < -5.39999999999999962e-252Initial program 81.5%
times-frac92.6%
associate-+l+92.6%
Simplified92.6%
associate-/r*99.7%
div-inv99.7%
Applied egg-rr99.7%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in x around 0 98.8%
+-commutative98.8%
Simplified98.8%
Taylor expanded in y around 0 84.0%
if -5.39999999999999962e-252 < x Initial program 64.1%
times-frac82.8%
associate-+l+82.8%
Simplified82.8%
*-commutative82.8%
clear-num82.7%
associate-/r*99.7%
frac-times99.1%
*-un-lft-identity99.1%
Applied egg-rr99.1%
Taylor expanded in x around 0 53.2%
+-commutative53.2%
Simplified53.2%
Final simplification70.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (* y y))))
(if (<= x -1.05e+14)
(/ y (* x x))
(if (<= x -1.5e-26)
t_0
(if (<= x -2.1e-137) (/ y x) (if (<= x 2e-188) (/ 1.0 (/ y x)) t_0))))))
double code(double x, double y) {
double t_0 = x / (y * y);
double tmp;
if (x <= -1.05e+14) {
tmp = y / (x * x);
} else if (x <= -1.5e-26) {
tmp = t_0;
} else if (x <= -2.1e-137) {
tmp = y / x;
} else if (x <= 2e-188) {
tmp = 1.0 / (y / x);
} else {
tmp = t_0;
}
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 * y)
if (x <= (-1.05d+14)) then
tmp = y / (x * x)
else if (x <= (-1.5d-26)) then
tmp = t_0
else if (x <= (-2.1d-137)) then
tmp = y / x
else if (x <= 2d-188) then
tmp = 1.0d0 / (y / x)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (y * y);
double tmp;
if (x <= -1.05e+14) {
tmp = y / (x * x);
} else if (x <= -1.5e-26) {
tmp = t_0;
} else if (x <= -2.1e-137) {
tmp = y / x;
} else if (x <= 2e-188) {
tmp = 1.0 / (y / x);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = x / (y * y) tmp = 0 if x <= -1.05e+14: tmp = y / (x * x) elif x <= -1.5e-26: tmp = t_0 elif x <= -2.1e-137: tmp = y / x elif x <= 2e-188: tmp = 1.0 / (y / x) else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(x / Float64(y * y)) tmp = 0.0 if (x <= -1.05e+14) tmp = Float64(y / Float64(x * x)); elseif (x <= -1.5e-26) tmp = t_0; elseif (x <= -2.1e-137) tmp = Float64(y / x); elseif (x <= 2e-188) tmp = Float64(1.0 / Float64(y / x)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = x / (y * y); tmp = 0.0; if (x <= -1.05e+14) tmp = y / (x * x); elseif (x <= -1.5e-26) tmp = t_0; elseif (x <= -2.1e-137) tmp = y / x; elseif (x <= 2e-188) tmp = 1.0 / (y / x); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.05e+14], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.5e-26], t$95$0, If[LessEqual[x, -2.1e-137], N[(y / x), $MachinePrecision], If[LessEqual[x, 2e-188], N[(1.0 / N[(y / x), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{y \cdot y}\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+14}:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{-26}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -2.1 \cdot 10^{-137}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;x \leq 2 \cdot 10^{-188}:\\
\;\;\;\;\frac{1}{\frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < -1.05e14Initial program 63.5%
times-frac83.2%
associate-+l+83.2%
Simplified83.2%
Taylor expanded in x around inf 75.2%
unpow275.2%
Simplified75.2%
if -1.05e14 < x < -1.50000000000000006e-26 or 1.9999999999999999e-188 < x Initial program 68.0%
times-frac90.7%
associate-+l+90.7%
Simplified90.7%
associate-/r*99.8%
div-inv99.7%
Applied egg-rr99.7%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
Taylor expanded in y around inf 42.3%
unpow242.3%
Simplified42.3%
if -1.50000000000000006e-26 < x < -2.09999999999999992e-137Initial program 86.1%
times-frac99.5%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in y around 0 45.1%
associate-/r*45.1%
+-commutative45.1%
Simplified45.1%
Taylor expanded in x around 0 45.1%
if -2.09999999999999992e-137 < x < 1.9999999999999999e-188Initial program 65.6%
times-frac72.9%
associate-+l+72.9%
Simplified72.9%
Taylor expanded in x around 0 85.8%
associate-/r*85.8%
+-commutative85.8%
Simplified85.8%
clear-num84.6%
inv-pow84.6%
div-inv84.7%
clear-num84.6%
Applied egg-rr84.6%
unpow-184.6%
*-commutative84.6%
Simplified84.6%
Taylor expanded in y around 0 75.0%
Final simplification57.7%
(FPCore (x y)
:precision binary64
(if (<= x -4.9e+15)
(/ y (* x x))
(if (or (<= x -4.8e-25) (not (<= x -7.5e-135)))
(/ x (* y (+ y 1.0)))
(/ y x))))
double code(double x, double y) {
double tmp;
if (x <= -4.9e+15) {
tmp = y / (x * x);
} else if ((x <= -4.8e-25) || !(x <= -7.5e-135)) {
tmp = x / (y * (y + 1.0));
} else {
tmp = 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.9d+15)) then
tmp = y / (x * x)
else if ((x <= (-4.8d-25)) .or. (.not. (x <= (-7.5d-135)))) then
tmp = x / (y * (y + 1.0d0))
else
tmp = y / x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -4.9e+15) {
tmp = y / (x * x);
} else if ((x <= -4.8e-25) || !(x <= -7.5e-135)) {
tmp = x / (y * (y + 1.0));
} else {
tmp = y / x;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -4.9e+15: tmp = y / (x * x) elif (x <= -4.8e-25) or not (x <= -7.5e-135): tmp = x / (y * (y + 1.0)) else: tmp = y / x return tmp
function code(x, y) tmp = 0.0 if (x <= -4.9e+15) tmp = Float64(y / Float64(x * x)); elseif ((x <= -4.8e-25) || !(x <= -7.5e-135)) tmp = Float64(x / Float64(y * Float64(y + 1.0))); else tmp = Float64(y / x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -4.9e+15) tmp = y / (x * x); elseif ((x <= -4.8e-25) || ~((x <= -7.5e-135))) tmp = x / (y * (y + 1.0)); else tmp = y / x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -4.9e+15], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -4.8e-25], N[Not[LessEqual[x, -7.5e-135]], $MachinePrecision]], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.9 \cdot 10^{+15}:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;x \leq -4.8 \cdot 10^{-25} \lor \neg \left(x \leq -7.5 \cdot 10^{-135}\right):\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{x}\\
\end{array}
\end{array}
if x < -4.9e15Initial program 63.5%
times-frac83.2%
associate-+l+83.2%
Simplified83.2%
Taylor expanded in x around inf 75.2%
unpow275.2%
Simplified75.2%
if -4.9e15 < x < -4.80000000000000018e-25 or -7.5e-135 < x Initial program 67.1%
times-frac84.0%
associate-+l+84.0%
Simplified84.0%
Taylor expanded in x around 0 60.7%
if -4.80000000000000018e-25 < x < -7.5e-135Initial program 86.1%
times-frac99.5%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in y around 0 45.1%
associate-/r*45.1%
+-commutative45.1%
Simplified45.1%
Taylor expanded in x around 0 45.1%
Final simplification61.9%
(FPCore (x y)
:precision binary64
(if (<= x -5.4e+14)
(/ (/ y x) (+ x 1.0))
(if (<= x -1.2e-25)
(/ x (* y (+ y 1.0)))
(if (<= x -1e-134) (/ y x) (/ (/ x y) (+ y 1.0))))))
double code(double x, double y) {
double tmp;
if (x <= -5.4e+14) {
tmp = (y / x) / (x + 1.0);
} else if (x <= -1.2e-25) {
tmp = x / (y * (y + 1.0));
} else if (x <= -1e-134) {
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 <= (-5.4d+14)) then
tmp = (y / x) / (x + 1.0d0)
else if (x <= (-1.2d-25)) then
tmp = x / (y * (y + 1.0d0))
else if (x <= (-1d-134)) 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 <= -5.4e+14) {
tmp = (y / x) / (x + 1.0);
} else if (x <= -1.2e-25) {
tmp = x / (y * (y + 1.0));
} else if (x <= -1e-134) {
tmp = y / x;
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -5.4e+14: tmp = (y / x) / (x + 1.0) elif x <= -1.2e-25: tmp = x / (y * (y + 1.0)) elif x <= -1e-134: tmp = y / x else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= -5.4e+14) tmp = Float64(Float64(y / x) / Float64(x + 1.0)); elseif (x <= -1.2e-25) tmp = Float64(x / Float64(y * Float64(y + 1.0))); elseif (x <= -1e-134) tmp = Float64(y / x); 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 <= -5.4e+14) tmp = (y / x) / (x + 1.0); elseif (x <= -1.2e-25) tmp = x / (y * (y + 1.0)); elseif (x <= -1e-134) tmp = y / x; else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -5.4e+14], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.2e-25], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1e-134], N[(y / x), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.4 \cdot 10^{+14}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{elif}\;x \leq -1.2 \cdot 10^{-25}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{elif}\;x \leq -1 \cdot 10^{-134}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -5.4e14Initial program 63.5%
times-frac83.2%
associate-+l+83.2%
Simplified83.2%
Taylor expanded in y around 0 75.2%
associate-/r*84.7%
+-commutative84.7%
Simplified84.7%
if -5.4e14 < x < -1.20000000000000005e-25Initial program 74.5%
times-frac99.7%
associate-+l+99.7%
Simplified99.7%
Taylor expanded in x around 0 90.8%
if -1.20000000000000005e-25 < x < -1.00000000000000004e-134Initial program 86.1%
times-frac99.5%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in y around 0 45.1%
associate-/r*45.1%
+-commutative45.1%
Simplified45.1%
Taylor expanded in x around 0 45.1%
if -1.00000000000000004e-134 < x Initial program 66.6%
times-frac82.9%
associate-+l+82.9%
Simplified82.9%
Taylor expanded in x around 0 58.7%
associate-/r*59.1%
+-commutative59.1%
Simplified59.1%
Final simplification64.1%
(FPCore (x y)
:precision binary64
(if (<= x -5.5e+14)
(/ (/ y (+ x y)) x)
(if (<= x -1.8e-23)
(/ x (* y (+ y 1.0)))
(if (<= x -1e-134) (/ y x) (/ (/ x y) (+ y 1.0))))))
double code(double x, double y) {
double tmp;
if (x <= -5.5e+14) {
tmp = (y / (x + y)) / x;
} else if (x <= -1.8e-23) {
tmp = x / (y * (y + 1.0));
} else if (x <= -1e-134) {
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 <= (-5.5d+14)) then
tmp = (y / (x + y)) / x
else if (x <= (-1.8d-23)) then
tmp = x / (y * (y + 1.0d0))
else if (x <= (-1d-134)) 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 <= -5.5e+14) {
tmp = (y / (x + y)) / x;
} else if (x <= -1.8e-23) {
tmp = x / (y * (y + 1.0));
} else if (x <= -1e-134) {
tmp = y / x;
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -5.5e+14: tmp = (y / (x + y)) / x elif x <= -1.8e-23: tmp = x / (y * (y + 1.0)) elif x <= -1e-134: tmp = y / x else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= -5.5e+14) tmp = Float64(Float64(y / Float64(x + y)) / x); elseif (x <= -1.8e-23) tmp = Float64(x / Float64(y * Float64(y + 1.0))); elseif (x <= -1e-134) tmp = Float64(y / x); 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 <= -5.5e+14) tmp = (y / (x + y)) / x; elseif (x <= -1.8e-23) tmp = x / (y * (y + 1.0)); elseif (x <= -1e-134) tmp = y / x; else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -5.5e+14], N[(N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -1.8e-23], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1e-134], N[(y / x), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \cdot 10^{+14}:\\
\;\;\;\;\frac{\frac{y}{x + y}}{x}\\
\mathbf{elif}\;x \leq -1.8 \cdot 10^{-23}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{elif}\;x \leq -1 \cdot 10^{-134}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -5.5e14Initial program 63.5%
times-frac83.2%
associate-+l+83.2%
Simplified83.2%
frac-times63.5%
*-commutative63.5%
frac-times83.2%
clear-num83.2%
associate-/r*99.8%
frac-times99.9%
*-un-lft-identity99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 84.9%
if -5.5e14 < x < -1.7999999999999999e-23Initial program 74.5%
times-frac99.7%
associate-+l+99.7%
Simplified99.7%
Taylor expanded in x around 0 90.8%
if -1.7999999999999999e-23 < x < -1.00000000000000004e-134Initial program 86.1%
times-frac99.5%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in y around 0 45.1%
associate-/r*45.1%
+-commutative45.1%
Simplified45.1%
Taylor expanded in x around 0 45.1%
if -1.00000000000000004e-134 < x Initial program 66.6%
times-frac82.9%
associate-+l+82.9%
Simplified82.9%
Taylor expanded in x around 0 58.7%
associate-/r*59.1%
+-commutative59.1%
Simplified59.1%
Final simplification64.2%
(FPCore (x y)
:precision binary64
(if (<= x -7.5e+14)
(/ (/ y (+ x y)) x)
(if (<= x -1.5e-26)
(/ (/ x (+ x y)) (+ y 1.0))
(if (<= x -1e-134) (/ y x) (/ (/ x y) (+ y 1.0))))))
double code(double x, double y) {
double tmp;
if (x <= -7.5e+14) {
tmp = (y / (x + y)) / x;
} else if (x <= -1.5e-26) {
tmp = (x / (x + y)) / (y + 1.0);
} else if (x <= -1e-134) {
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 <= (-7.5d+14)) then
tmp = (y / (x + y)) / x
else if (x <= (-1.5d-26)) then
tmp = (x / (x + y)) / (y + 1.0d0)
else if (x <= (-1d-134)) 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 <= -7.5e+14) {
tmp = (y / (x + y)) / x;
} else if (x <= -1.5e-26) {
tmp = (x / (x + y)) / (y + 1.0);
} else if (x <= -1e-134) {
tmp = y / x;
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -7.5e+14: tmp = (y / (x + y)) / x elif x <= -1.5e-26: tmp = (x / (x + y)) / (y + 1.0) elif x <= -1e-134: tmp = y / x else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= -7.5e+14) tmp = Float64(Float64(y / Float64(x + y)) / x); elseif (x <= -1.5e-26) tmp = Float64(Float64(x / Float64(x + y)) / Float64(y + 1.0)); elseif (x <= -1e-134) tmp = Float64(y / x); 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 <= -7.5e+14) tmp = (y / (x + y)) / x; elseif (x <= -1.5e-26) tmp = (x / (x + y)) / (y + 1.0); elseif (x <= -1e-134) tmp = y / x; else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -7.5e+14], N[(N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[x, -1.5e-26], N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1e-134], N[(y / x), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{+14}:\\
\;\;\;\;\frac{\frac{y}{x + y}}{x}\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{-26}:\\
\;\;\;\;\frac{\frac{x}{x + y}}{y + 1}\\
\mathbf{elif}\;x \leq -1 \cdot 10^{-134}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -7.5e14Initial program 63.5%
times-frac83.2%
associate-+l+83.2%
Simplified83.2%
frac-times63.5%
*-commutative63.5%
frac-times83.2%
clear-num83.2%
associate-/r*99.8%
frac-times99.9%
*-un-lft-identity99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 84.9%
if -7.5e14 < x < -1.50000000000000006e-26Initial program 74.5%
times-frac99.7%
associate-+l+99.7%
Simplified99.7%
*-commutative99.7%
clear-num99.6%
associate-/r*99.7%
frac-times99.7%
*-un-lft-identity99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 91.1%
+-commutative91.1%
Simplified91.1%
if -1.50000000000000006e-26 < x < -1.00000000000000004e-134Initial program 86.1%
times-frac99.5%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in y around 0 45.1%
associate-/r*45.1%
+-commutative45.1%
Simplified45.1%
Taylor expanded in x around 0 45.1%
if -1.00000000000000004e-134 < x Initial program 66.6%
times-frac82.9%
associate-+l+82.9%
Simplified82.9%
Taylor expanded in x around 0 58.7%
associate-/r*59.1%
+-commutative59.1%
Simplified59.1%
Final simplification64.2%
(FPCore (x y) :precision binary64 (if (<= y 9.2e-77) (/ y (* x (+ x 1.0))) (if (<= y 1.9e+165) (/ x (* y (+ y 1.0))) (/ 1.0 (* y (/ y x))))))
double code(double x, double y) {
double tmp;
if (y <= 9.2e-77) {
tmp = y / (x * (x + 1.0));
} else if (y <= 1.9e+165) {
tmp = x / (y * (y + 1.0));
} else {
tmp = 1.0 / (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 <= 9.2d-77) then
tmp = y / (x * (x + 1.0d0))
else if (y <= 1.9d+165) then
tmp = x / (y * (y + 1.0d0))
else
tmp = 1.0d0 / (y * (y / x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 9.2e-77) {
tmp = y / (x * (x + 1.0));
} else if (y <= 1.9e+165) {
tmp = x / (y * (y + 1.0));
} else {
tmp = 1.0 / (y * (y / x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 9.2e-77: tmp = y / (x * (x + 1.0)) elif y <= 1.9e+165: tmp = x / (y * (y + 1.0)) else: tmp = 1.0 / (y * (y / x)) return tmp
function code(x, y) tmp = 0.0 if (y <= 9.2e-77) tmp = Float64(y / Float64(x * Float64(x + 1.0))); elseif (y <= 1.9e+165) tmp = Float64(x / Float64(y * Float64(y + 1.0))); else tmp = Float64(1.0 / Float64(y * Float64(y / x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 9.2e-77) tmp = y / (x * (x + 1.0)); elseif (y <= 1.9e+165) tmp = x / (y * (y + 1.0)); else tmp = 1.0 / (y * (y / x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 9.2e-77], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e+165], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(y * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 9.2 \cdot 10^{-77}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+165}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y \cdot \frac{y}{x}}\\
\end{array}
\end{array}
if y < 9.19999999999999994e-77Initial program 67.4%
times-frac83.7%
associate-+l+83.7%
Simplified83.7%
Taylor expanded in y around 0 59.1%
if 9.19999999999999994e-77 < y < 1.89999999999999995e165Initial program 80.2%
times-frac93.9%
associate-+l+93.9%
Simplified93.9%
Taylor expanded in x around 0 65.2%
if 1.89999999999999995e165 < y Initial program 53.1%
times-frac80.1%
associate-+l+80.1%
Simplified80.1%
Taylor expanded in x around 0 80.1%
associate-/r*88.0%
+-commutative88.0%
Simplified88.0%
clear-num85.9%
inv-pow85.9%
div-inv85.9%
clear-num85.9%
Applied egg-rr85.9%
unpow-185.9%
*-commutative85.9%
Simplified85.9%
Taylor expanded in y around inf 80.1%
unpow280.1%
associate-*l/85.9%
*-commutative85.9%
Simplified85.9%
Final simplification63.8%
(FPCore (x y) :precision binary64 (if (<= y 9.8e-77) (/ y (+ x (* x x))) (if (<= y 2.3e+165) (/ x (* y (+ y 1.0))) (/ 1.0 (* y (/ y x))))))
double code(double x, double y) {
double tmp;
if (y <= 9.8e-77) {
tmp = y / (x + (x * x));
} else if (y <= 2.3e+165) {
tmp = x / (y * (y + 1.0));
} else {
tmp = 1.0 / (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 <= 9.8d-77) then
tmp = y / (x + (x * x))
else if (y <= 2.3d+165) then
tmp = x / (y * (y + 1.0d0))
else
tmp = 1.0d0 / (y * (y / x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 9.8e-77) {
tmp = y / (x + (x * x));
} else if (y <= 2.3e+165) {
tmp = x / (y * (y + 1.0));
} else {
tmp = 1.0 / (y * (y / x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 9.8e-77: tmp = y / (x + (x * x)) elif y <= 2.3e+165: tmp = x / (y * (y + 1.0)) else: tmp = 1.0 / (y * (y / x)) return tmp
function code(x, y) tmp = 0.0 if (y <= 9.8e-77) tmp = Float64(y / Float64(x + Float64(x * x))); elseif (y <= 2.3e+165) tmp = Float64(x / Float64(y * Float64(y + 1.0))); else tmp = Float64(1.0 / Float64(y * Float64(y / x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 9.8e-77) tmp = y / (x + (x * x)); elseif (y <= 2.3e+165) tmp = x / (y * (y + 1.0)); else tmp = 1.0 / (y * (y / x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 9.8e-77], N[(y / N[(x + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.3e+165], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(y * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 9.8 \cdot 10^{-77}:\\
\;\;\;\;\frac{y}{x + x \cdot x}\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{+165}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y \cdot \frac{y}{x}}\\
\end{array}
\end{array}
if y < 9.7999999999999994e-77Initial program 67.4%
times-frac83.7%
associate-+l+83.7%
Simplified83.7%
frac-times67.4%
*-commutative67.4%
frac-times83.8%
clear-num83.7%
associate-/r*99.7%
frac-times99.3%
*-un-lft-identity99.3%
Applied egg-rr99.3%
Taylor expanded in y around 0 59.1%
distribute-rgt-in59.1%
*-lft-identity59.1%
Simplified59.1%
if 9.7999999999999994e-77 < y < 2.30000000000000016e165Initial program 80.2%
times-frac93.9%
associate-+l+93.9%
Simplified93.9%
Taylor expanded in x around 0 65.2%
if 2.30000000000000016e165 < y Initial program 53.1%
times-frac80.1%
associate-+l+80.1%
Simplified80.1%
Taylor expanded in x around 0 80.1%
associate-/r*88.0%
+-commutative88.0%
Simplified88.0%
clear-num85.9%
inv-pow85.9%
div-inv85.9%
clear-num85.9%
Applied egg-rr85.9%
unpow-185.9%
*-commutative85.9%
Simplified85.9%
Taylor expanded in y around inf 80.1%
unpow280.1%
associate-*l/85.9%
*-commutative85.9%
Simplified85.9%
Final simplification63.8%
(FPCore (x y) :precision binary64 (if (<= y 2.1e-183) (/ y x) (if (<= y 0.75) (- (/ x y) x) (/ x (* y y)))))
double code(double x, double y) {
double tmp;
if (y <= 2.1e-183) {
tmp = y / x;
} else if (y <= 0.75) {
tmp = (x / y) - x;
} else {
tmp = x / (y * 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.1d-183) then
tmp = y / x
else if (y <= 0.75d0) then
tmp = (x / y) - x
else
tmp = x / (y * y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2.1e-183) {
tmp = y / x;
} else if (y <= 0.75) {
tmp = (x / y) - x;
} else {
tmp = x / (y * y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.1e-183: tmp = y / x elif y <= 0.75: tmp = (x / y) - x else: tmp = x / (y * y) return tmp
function code(x, y) tmp = 0.0 if (y <= 2.1e-183) tmp = Float64(y / x); elseif (y <= 0.75) tmp = Float64(Float64(x / y) - x); else tmp = Float64(x / Float64(y * y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.1e-183) tmp = y / x; elseif (y <= 0.75) tmp = (x / y) - x; else tmp = x / (y * y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.1e-183], N[(y / x), $MachinePrecision], If[LessEqual[y, 0.75], N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision], N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.1 \cdot 10^{-183}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 0.75:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\end{array}
if y < 2.1000000000000002e-183Initial program 65.7%
times-frac83.0%
associate-+l+83.0%
Simplified83.0%
Taylor expanded in y around 0 56.4%
associate-/r*58.2%
+-commutative58.2%
Simplified58.2%
Taylor expanded in x around 0 38.4%
if 2.1000000000000002e-183 < y < 0.75Initial program 88.3%
times-frac94.9%
associate-+l+94.9%
Simplified94.9%
Taylor expanded in x around 0 34.1%
associate-/r*34.2%
+-commutative34.2%
Simplified34.2%
Taylor expanded in y around 0 34.2%
neg-mul-134.2%
+-commutative34.2%
unsub-neg34.2%
Simplified34.2%
if 0.75 < y Initial program 63.5%
times-frac86.0%
associate-+l+86.0%
Simplified86.0%
associate-/r*99.8%
div-inv99.7%
Applied egg-rr99.7%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
Taylor expanded in y around inf 75.6%
unpow275.6%
Simplified75.6%
Final simplification47.8%
(FPCore (x y) :precision binary64 (if (<= y 2.3e-77) (/ y (+ x (* x x))) (/ (/ x y) (+ y 1.0))))
double code(double x, double y) {
double tmp;
if (y <= 2.3e-77) {
tmp = y / (x + (x * 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 (y <= 2.3d-77) then
tmp = y / (x + (x * 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 (y <= 2.3e-77) {
tmp = y / (x + (x * x));
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.3e-77: tmp = y / (x + (x * x)) else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (y <= 2.3e-77) tmp = Float64(y / Float64(x + Float64(x * x))); else tmp = Float64(Float64(x / y) / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.3e-77) tmp = y / (x + (x * x)); else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.3e-77], N[(y / N[(x + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.3 \cdot 10^{-77}:\\
\;\;\;\;\frac{y}{x + x \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if y < 2.29999999999999999e-77Initial program 67.4%
times-frac83.7%
associate-+l+83.7%
Simplified83.7%
frac-times67.4%
*-commutative67.4%
frac-times83.8%
clear-num83.7%
associate-/r*99.7%
frac-times99.3%
*-un-lft-identity99.3%
Applied egg-rr99.3%
Taylor expanded in y around 0 59.1%
distribute-rgt-in59.1%
*-lft-identity59.1%
Simplified59.1%
if 2.29999999999999999e-77 < y Initial program 70.9%
times-frac89.1%
associate-+l+89.1%
Simplified89.1%
Taylor expanded in x around 0 70.3%
associate-/r*71.7%
+-commutative71.7%
Simplified71.7%
Final simplification63.5%
(FPCore (x y) :precision binary64 (if (<= y 1.6e-183) (/ y x) (/ 1.0 (/ y x))))
double code(double x, double y) {
double tmp;
if (y <= 1.6e-183) {
tmp = y / x;
} else {
tmp = 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 (y <= 1.6d-183) then
tmp = y / x
else
tmp = 1.0d0 / (y / x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 1.6e-183) {
tmp = y / x;
} else {
tmp = 1.0 / (y / x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1.6e-183: tmp = y / x else: tmp = 1.0 / (y / x) return tmp
function code(x, y) tmp = 0.0 if (y <= 1.6e-183) tmp = Float64(y / x); else tmp = Float64(1.0 / Float64(y / x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 1.6e-183) tmp = y / x; else tmp = 1.0 / (y / x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 1.6e-183], N[(y / x), $MachinePrecision], N[(1.0 / N[(y / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.6 \cdot 10^{-183}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y}{x}}\\
\end{array}
\end{array}
if y < 1.6000000000000001e-183Initial program 65.7%
times-frac83.0%
associate-+l+83.0%
Simplified83.0%
Taylor expanded in y around 0 56.4%
associate-/r*58.2%
+-commutative58.2%
Simplified58.2%
Taylor expanded in x around 0 38.4%
if 1.6000000000000001e-183 < y Initial program 72.6%
times-frac89.2%
associate-+l+89.2%
Simplified89.2%
Taylor expanded in x around 0 62.1%
associate-/r*63.2%
+-commutative63.2%
Simplified63.2%
clear-num62.5%
inv-pow62.5%
div-inv62.5%
clear-num62.5%
Applied egg-rr62.5%
unpow-162.6%
*-commutative62.6%
Simplified62.6%
Taylor expanded in y around 0 30.9%
Final simplification35.2%
(FPCore (x y) :precision binary64 (if (<= y 2.2e-183) (/ y x) (/ x y)))
double code(double x, double y) {
double tmp;
if (y <= 2.2e-183) {
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 <= 2.2d-183) 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 <= 2.2e-183) {
tmp = y / x;
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.2e-183: tmp = y / x else: tmp = x / y return tmp
function code(x, y) tmp = 0.0 if (y <= 2.2e-183) tmp = Float64(y / x); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.2e-183) tmp = y / x; else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.2e-183], N[(y / x), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.2 \cdot 10^{-183}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if y < 2.2e-183Initial program 65.7%
times-frac83.0%
associate-+l+83.0%
Simplified83.0%
Taylor expanded in y around 0 56.4%
associate-/r*58.2%
+-commutative58.2%
Simplified58.2%
Taylor expanded in x around 0 38.4%
if 2.2e-183 < y Initial program 72.6%
times-frac89.2%
associate-+l+89.2%
Simplified89.2%
Taylor expanded in x around 0 62.1%
associate-/r*63.2%
+-commutative63.2%
Simplified63.2%
Taylor expanded in y around 0 29.6%
Final simplification34.7%
(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 68.6%
times-frac85.6%
associate-+l+85.6%
Simplified85.6%
*-commutative85.6%
clear-num85.6%
associate-/r*99.7%
frac-times99.2%
*-un-lft-identity99.2%
Applied egg-rr99.2%
Taylor expanded in x around inf 50.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 68.6%
times-frac85.6%
associate-+l+85.6%
Simplified85.6%
Taylor expanded in x around 0 50.6%
associate-/r*51.4%
+-commutative51.4%
Simplified51.4%
Taylor expanded in y around 0 26.6%
Final simplification26.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 2023297
(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))))