
(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 22 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) 1.0)) (+ x (+ y 1.0))))
double code(double x, double y) {
return ((x / (x + y)) / ((x / y) + 1.0)) / (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) + 1.0d0)) / (x + (y + 1.0d0))
end function
public static double code(double x, double y) {
return ((x / (x + y)) / ((x / y) + 1.0)) / (x + (y + 1.0));
}
def code(x, y): return ((x / (x + y)) / ((x / y) + 1.0)) / (x + (y + 1.0))
function code(x, y) return Float64(Float64(Float64(x / Float64(x + y)) / Float64(Float64(x / y) + 1.0)) / Float64(x + Float64(y + 1.0))) end
function tmp = code(x, y) tmp = ((x / (x + y)) / ((x / y) + 1.0)) / (x + (y + 1.0)); end
code[x_, y_] := N[(N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(N[(x / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{\frac{x}{x + y}}{\frac{x}{y} + 1}}{x + \left(y + 1\right)}
\end{array}
Initial program 69.0%
*-commutative69.0%
associate-*l*69.0%
times-frac91.9%
+-commutative91.9%
+-commutative91.9%
associate-+r+91.9%
+-commutative91.9%
associate-+l+91.9%
Applied egg-rr91.9%
*-commutative91.9%
associate-/r*99.8%
clear-num99.8%
frac-times99.5%
+-commutative99.5%
+-commutative99.5%
+-commutative99.5%
Applied egg-rr99.5%
*-rgt-identity99.5%
*-commutative99.5%
times-frac99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
*-rgt-identity99.7%
Applied egg-rr99.7%
associate-*l/99.8%
*-lft-identity99.8%
Simplified99.8%
Taylor expanded in x around 0 99.8%
Final simplification99.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ x (+ y 1.0))))
(if (<= y -1.45e-69)
(/ (/ (/ x x) (/ (+ x y) y)) t_0)
(if (<= y 1.2e-48)
(/ y (* (+ x y) (+ (+ x 1.0) (* y (/ 1.0 x)))))
(if (<= y 1.6e+99)
(* x (/ y (* t_0 (* (+ x y) (+ x y)))))
(/ (/ x (+ x y)) t_0))))))
double code(double x, double y) {
double t_0 = x + (y + 1.0);
double tmp;
if (y <= -1.45e-69) {
tmp = ((x / x) / ((x + y) / y)) / t_0;
} else if (y <= 1.2e-48) {
tmp = y / ((x + y) * ((x + 1.0) + (y * (1.0 / x))));
} else if (y <= 1.6e+99) {
tmp = x * (y / (t_0 * ((x + y) * (x + y))));
} else {
tmp = (x / (x + y)) / 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 + 1.0d0)
if (y <= (-1.45d-69)) then
tmp = ((x / x) / ((x + y) / y)) / t_0
else if (y <= 1.2d-48) then
tmp = y / ((x + y) * ((x + 1.0d0) + (y * (1.0d0 / x))))
else if (y <= 1.6d+99) then
tmp = x * (y / (t_0 * ((x + y) * (x + y))))
else
tmp = (x / (x + y)) / t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x + (y + 1.0);
double tmp;
if (y <= -1.45e-69) {
tmp = ((x / x) / ((x + y) / y)) / t_0;
} else if (y <= 1.2e-48) {
tmp = y / ((x + y) * ((x + 1.0) + (y * (1.0 / x))));
} else if (y <= 1.6e+99) {
tmp = x * (y / (t_0 * ((x + y) * (x + y))));
} else {
tmp = (x / (x + y)) / t_0;
}
return tmp;
}
def code(x, y): t_0 = x + (y + 1.0) tmp = 0 if y <= -1.45e-69: tmp = ((x / x) / ((x + y) / y)) / t_0 elif y <= 1.2e-48: tmp = y / ((x + y) * ((x + 1.0) + (y * (1.0 / x)))) elif y <= 1.6e+99: tmp = x * (y / (t_0 * ((x + y) * (x + y)))) else: tmp = (x / (x + y)) / t_0 return tmp
function code(x, y) t_0 = Float64(x + Float64(y + 1.0)) tmp = 0.0 if (y <= -1.45e-69) tmp = Float64(Float64(Float64(x / x) / Float64(Float64(x + y) / y)) / t_0); elseif (y <= 1.2e-48) tmp = Float64(y / Float64(Float64(x + y) * Float64(Float64(x + 1.0) + Float64(y * Float64(1.0 / x))))); elseif (y <= 1.6e+99) tmp = Float64(x * Float64(y / Float64(t_0 * Float64(Float64(x + y) * Float64(x + y))))); else tmp = Float64(Float64(x / Float64(x + y)) / t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = x + (y + 1.0); tmp = 0.0; if (y <= -1.45e-69) tmp = ((x / x) / ((x + y) / y)) / t_0; elseif (y <= 1.2e-48) tmp = y / ((x + y) * ((x + 1.0) + (y * (1.0 / x)))); elseif (y <= 1.6e+99) tmp = x * (y / (t_0 * ((x + y) * (x + y)))); else tmp = (x / (x + y)) / t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.45e-69], N[(N[(N[(x / x), $MachinePrecision] / N[(N[(x + y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[y, 1.2e-48], N[(y / N[(N[(x + y), $MachinePrecision] * N[(N[(x + 1.0), $MachinePrecision] + N[(y * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e+99], N[(x * N[(y / N[(t$95$0 * N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;y \leq -1.45 \cdot 10^{-69}:\\
\;\;\;\;\frac{\frac{\frac{x}{x}}{\frac{x + y}{y}}}{t\_0}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-48}:\\
\;\;\;\;\frac{y}{\left(x + y\right) \cdot \left(\left(x + 1\right) + y \cdot \frac{1}{x}\right)}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+99}:\\
\;\;\;\;x \cdot \frac{y}{t\_0 \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{x + y}}{t\_0}\\
\end{array}
\end{array}
if y < -1.4499999999999999e-69Initial program 70.0%
*-commutative70.0%
associate-*l*70.0%
times-frac87.1%
+-commutative87.1%
+-commutative87.1%
associate-+r+87.1%
+-commutative87.1%
associate-+l+87.1%
Applied egg-rr87.1%
*-commutative87.1%
associate-/r*99.8%
clear-num99.8%
frac-times99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
*-rgt-identity99.7%
*-commutative99.7%
times-frac99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
*-rgt-identity99.7%
Applied egg-rr99.7%
associate-*l/99.8%
*-lft-identity99.8%
Simplified99.8%
Taylor expanded in x around inf 40.1%
if -1.4499999999999999e-69 < y < 1.2e-48Initial program 66.6%
*-commutative66.6%
associate-*l*66.5%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
*-commutative99.8%
clear-num99.7%
frac-times99.7%
*-un-lft-identity99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 99.7%
associate-+r+99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
if 1.2e-48 < y < 1.6e99Initial program 90.7%
associate-/l*90.7%
associate-+l+90.7%
Simplified90.7%
if 1.6e99 < y Initial program 56.2%
*-commutative56.2%
associate-*l*56.2%
times-frac77.8%
+-commutative77.8%
+-commutative77.8%
associate-+r+77.8%
+-commutative77.8%
associate-+l+77.8%
Applied egg-rr77.8%
*-commutative77.8%
associate-/r*99.9%
clear-num99.9%
frac-times98.7%
+-commutative98.7%
+-commutative98.7%
+-commutative98.7%
Applied egg-rr98.7%
*-rgt-identity98.7%
*-commutative98.7%
times-frac99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
*-rgt-identity99.8%
Applied egg-rr99.8%
associate-*l/99.9%
*-lft-identity99.9%
Simplified99.9%
Taylor expanded in x around 0 84.7%
Final simplification76.1%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ x (+ y 1.0))))
(if (<= x -1.15e+181)
(/ (/ y x) t_0)
(if (<= x -2.35e-7)
(/ y (* (+ x y) (+ (+ x 1.0) (* y 2.0))))
(if (<= x 5.4e+71)
(* (/ y (+ x y)) (/ x (* (+ x y) (+ y 1.0))))
(/ (/ x (+ x y)) t_0))))))
double code(double x, double y) {
double t_0 = x + (y + 1.0);
double tmp;
if (x <= -1.15e+181) {
tmp = (y / x) / t_0;
} else if (x <= -2.35e-7) {
tmp = y / ((x + y) * ((x + 1.0) + (y * 2.0)));
} else if (x <= 5.4e+71) {
tmp = (y / (x + y)) * (x / ((x + y) * (y + 1.0)));
} else {
tmp = (x / (x + y)) / 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 + 1.0d0)
if (x <= (-1.15d+181)) then
tmp = (y / x) / t_0
else if (x <= (-2.35d-7)) then
tmp = y / ((x + y) * ((x + 1.0d0) + (y * 2.0d0)))
else if (x <= 5.4d+71) then
tmp = (y / (x + y)) * (x / ((x + y) * (y + 1.0d0)))
else
tmp = (x / (x + y)) / t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x + (y + 1.0);
double tmp;
if (x <= -1.15e+181) {
tmp = (y / x) / t_0;
} else if (x <= -2.35e-7) {
tmp = y / ((x + y) * ((x + 1.0) + (y * 2.0)));
} else if (x <= 5.4e+71) {
tmp = (y / (x + y)) * (x / ((x + y) * (y + 1.0)));
} else {
tmp = (x / (x + y)) / t_0;
}
return tmp;
}
def code(x, y): t_0 = x + (y + 1.0) tmp = 0 if x <= -1.15e+181: tmp = (y / x) / t_0 elif x <= -2.35e-7: tmp = y / ((x + y) * ((x + 1.0) + (y * 2.0))) elif x <= 5.4e+71: tmp = (y / (x + y)) * (x / ((x + y) * (y + 1.0))) else: tmp = (x / (x + y)) / t_0 return tmp
function code(x, y) t_0 = Float64(x + Float64(y + 1.0)) tmp = 0.0 if (x <= -1.15e+181) tmp = Float64(Float64(y / x) / t_0); elseif (x <= -2.35e-7) tmp = Float64(y / Float64(Float64(x + y) * Float64(Float64(x + 1.0) + Float64(y * 2.0)))); elseif (x <= 5.4e+71) tmp = Float64(Float64(y / Float64(x + y)) * Float64(x / Float64(Float64(x + y) * Float64(y + 1.0)))); else tmp = Float64(Float64(x / Float64(x + y)) / t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = x + (y + 1.0); tmp = 0.0; if (x <= -1.15e+181) tmp = (y / x) / t_0; elseif (x <= -2.35e-7) tmp = y / ((x + y) * ((x + 1.0) + (y * 2.0))); elseif (x <= 5.4e+71) tmp = (y / (x + y)) * (x / ((x + y) * (y + 1.0))); else tmp = (x / (x + y)) / t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.15e+181], N[(N[(y / x), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[x, -2.35e-7], N[(y / N[(N[(x + y), $MachinePrecision] * N[(N[(x + 1.0), $MachinePrecision] + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.4e+71], N[(N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(x / N[(N[(x + y), $MachinePrecision] * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;x \leq -1.15 \cdot 10^{+181}:\\
\;\;\;\;\frac{\frac{y}{x}}{t\_0}\\
\mathbf{elif}\;x \leq -2.35 \cdot 10^{-7}:\\
\;\;\;\;\frac{y}{\left(x + y\right) \cdot \left(\left(x + 1\right) + y \cdot 2\right)}\\
\mathbf{elif}\;x \leq 5.4 \cdot 10^{+71}:\\
\;\;\;\;\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{x + y}}{t\_0}\\
\end{array}
\end{array}
if x < -1.1499999999999999e181Initial program 48.1%
*-commutative48.1%
associate-*l*48.1%
times-frac73.8%
+-commutative73.8%
+-commutative73.8%
associate-+r+73.8%
+-commutative73.8%
associate-+l+73.8%
Applied egg-rr73.8%
*-commutative73.8%
associate-/r*99.9%
clear-num99.9%
frac-times98.0%
+-commutative98.0%
+-commutative98.0%
+-commutative98.0%
Applied egg-rr98.0%
*-rgt-identity98.0%
*-commutative98.0%
times-frac99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
*-rgt-identity99.9%
Applied egg-rr99.9%
associate-*l/99.8%
*-lft-identity99.8%
Simplified99.8%
Taylor expanded in x around inf 86.3%
if -1.1499999999999999e181 < x < -2.35e-7Initial program 77.2%
*-commutative77.2%
associate-*l*77.2%
times-frac94.9%
+-commutative94.9%
+-commutative94.9%
associate-+r+94.9%
+-commutative94.9%
associate-+l+94.9%
Applied egg-rr94.9%
*-commutative94.9%
clear-num94.9%
frac-times95.1%
*-un-lft-identity95.1%
+-commutative95.1%
+-commutative95.1%
+-commutative95.1%
Applied egg-rr95.1%
Taylor expanded in y around 0 84.7%
associate-+r+84.7%
+-commutative84.7%
Simplified84.7%
Taylor expanded in x around inf 84.5%
*-commutative84.5%
Simplified84.5%
if -2.35e-7 < x < 5.39999999999999993e71Initial program 77.1%
*-commutative77.1%
associate-*l*77.1%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 96.5%
+-commutative96.5%
Simplified96.5%
if 5.39999999999999993e71 < x Initial program 52.1%
*-commutative52.1%
associate-*l*52.1%
times-frac77.3%
+-commutative77.3%
+-commutative77.3%
associate-+r+77.3%
+-commutative77.3%
associate-+l+77.3%
Applied egg-rr77.3%
*-commutative77.3%
associate-/r*99.8%
clear-num99.8%
frac-times99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
*-rgt-identity99.8%
*-commutative99.8%
times-frac99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
*-rgt-identity99.7%
Applied egg-rr99.7%
associate-*l/99.8%
*-lft-identity99.8%
Simplified99.8%
Taylor expanded in x around 0 26.8%
Final simplification80.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ x (+ y 1.0))))
(if (<= x -1.5e+181)
(/ (/ y x) t_0)
(if (<= x -1e-7)
(/ y (* (+ x y) (+ (+ x 1.0) (* y 2.0))))
(if (<= x -1.58e-162)
(* x (/ y (* (+ y 1.0) (* (+ x y) (+ x y)))))
(/ (/ x y) t_0))))))
double code(double x, double y) {
double t_0 = x + (y + 1.0);
double tmp;
if (x <= -1.5e+181) {
tmp = (y / x) / t_0;
} else if (x <= -1e-7) {
tmp = y / ((x + y) * ((x + 1.0) + (y * 2.0)));
} else if (x <= -1.58e-162) {
tmp = x * (y / ((y + 1.0) * ((x + y) * (x + y))));
} else {
tmp = (x / y) / 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 + 1.0d0)
if (x <= (-1.5d+181)) then
tmp = (y / x) / t_0
else if (x <= (-1d-7)) then
tmp = y / ((x + y) * ((x + 1.0d0) + (y * 2.0d0)))
else if (x <= (-1.58d-162)) then
tmp = x * (y / ((y + 1.0d0) * ((x + y) * (x + y))))
else
tmp = (x / y) / t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x + (y + 1.0);
double tmp;
if (x <= -1.5e+181) {
tmp = (y / x) / t_0;
} else if (x <= -1e-7) {
tmp = y / ((x + y) * ((x + 1.0) + (y * 2.0)));
} else if (x <= -1.58e-162) {
tmp = x * (y / ((y + 1.0) * ((x + y) * (x + y))));
} else {
tmp = (x / y) / t_0;
}
return tmp;
}
def code(x, y): t_0 = x + (y + 1.0) tmp = 0 if x <= -1.5e+181: tmp = (y / x) / t_0 elif x <= -1e-7: tmp = y / ((x + y) * ((x + 1.0) + (y * 2.0))) elif x <= -1.58e-162: tmp = x * (y / ((y + 1.0) * ((x + y) * (x + y)))) else: tmp = (x / y) / t_0 return tmp
function code(x, y) t_0 = Float64(x + Float64(y + 1.0)) tmp = 0.0 if (x <= -1.5e+181) tmp = Float64(Float64(y / x) / t_0); elseif (x <= -1e-7) tmp = Float64(y / Float64(Float64(x + y) * Float64(Float64(x + 1.0) + Float64(y * 2.0)))); elseif (x <= -1.58e-162) tmp = Float64(x * Float64(y / Float64(Float64(y + 1.0) * Float64(Float64(x + y) * Float64(x + y))))); else tmp = Float64(Float64(x / y) / t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = x + (y + 1.0); tmp = 0.0; if (x <= -1.5e+181) tmp = (y / x) / t_0; elseif (x <= -1e-7) tmp = y / ((x + y) * ((x + 1.0) + (y * 2.0))); elseif (x <= -1.58e-162) tmp = x * (y / ((y + 1.0) * ((x + y) * (x + y)))); else tmp = (x / y) / t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.5e+181], N[(N[(y / x), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[x, -1e-7], N[(y / N[(N[(x + y), $MachinePrecision] * N[(N[(x + 1.0), $MachinePrecision] + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.58e-162], N[(x * N[(y / N[(N[(y + 1.0), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;x \leq -1.5 \cdot 10^{+181}:\\
\;\;\;\;\frac{\frac{y}{x}}{t\_0}\\
\mathbf{elif}\;x \leq -1 \cdot 10^{-7}:\\
\;\;\;\;\frac{y}{\left(x + y\right) \cdot \left(\left(x + 1\right) + y \cdot 2\right)}\\
\mathbf{elif}\;x \leq -1.58 \cdot 10^{-162}:\\
\;\;\;\;x \cdot \frac{y}{\left(y + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t\_0}\\
\end{array}
\end{array}
if x < -1.50000000000000006e181Initial program 48.1%
*-commutative48.1%
associate-*l*48.1%
times-frac73.8%
+-commutative73.8%
+-commutative73.8%
associate-+r+73.8%
+-commutative73.8%
associate-+l+73.8%
Applied egg-rr73.8%
*-commutative73.8%
associate-/r*99.9%
clear-num99.9%
frac-times98.0%
+-commutative98.0%
+-commutative98.0%
+-commutative98.0%
Applied egg-rr98.0%
*-rgt-identity98.0%
*-commutative98.0%
times-frac99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
*-rgt-identity99.9%
Applied egg-rr99.9%
associate-*l/99.8%
*-lft-identity99.8%
Simplified99.8%
Taylor expanded in x around inf 86.3%
if -1.50000000000000006e181 < x < -9.9999999999999995e-8Initial program 77.2%
*-commutative77.2%
associate-*l*77.2%
times-frac94.9%
+-commutative94.9%
+-commutative94.9%
associate-+r+94.9%
+-commutative94.9%
associate-+l+94.9%
Applied egg-rr94.9%
*-commutative94.9%
clear-num94.9%
frac-times95.1%
*-un-lft-identity95.1%
+-commutative95.1%
+-commutative95.1%
+-commutative95.1%
Applied egg-rr95.1%
Taylor expanded in y around 0 84.7%
associate-+r+84.7%
+-commutative84.7%
Simplified84.7%
Taylor expanded in x around inf 84.5%
*-commutative84.5%
Simplified84.5%
if -9.9999999999999995e-8 < x < -1.5800000000000001e-162Initial program 90.3%
associate-/l*99.5%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in x around 0 97.1%
+-commutative97.1%
Simplified97.1%
if -1.5800000000000001e-162 < x Initial program 67.3%
*-commutative67.3%
associate-*l*67.3%
times-frac93.2%
+-commutative93.2%
+-commutative93.2%
associate-+r+93.2%
+-commutative93.2%
associate-+l+93.2%
Applied egg-rr93.2%
*-commutative93.2%
associate-/r*99.8%
clear-num99.8%
frac-times99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
*-rgt-identity99.8%
*-commutative99.8%
times-frac99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
*-rgt-identity99.8%
Applied egg-rr99.8%
associate-*l/99.8%
*-lft-identity99.8%
Simplified99.8%
Taylor expanded in x around 0 61.6%
Final simplification71.9%
(FPCore (x y)
:precision binary64
(if (<= y -1.7e+75)
(/ (/ y x) (+ x 1.0))
(if (<= y 3.8e+154)
(/ (* y (/ x (* (+ x y) (+ y (+ x 1.0))))) (+ x y))
(/ (/ x y) (+ x (+ y 1.0))))))
double code(double x, double y) {
double tmp;
if (y <= -1.7e+75) {
tmp = (y / x) / (x + 1.0);
} else if (y <= 3.8e+154) {
tmp = (y * (x / ((x + y) * (y + (x + 1.0))))) / (x + y);
} else {
tmp = (x / y) / (x + (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 <= (-1.7d+75)) then
tmp = (y / x) / (x + 1.0d0)
else if (y <= 3.8d+154) then
tmp = (y * (x / ((x + y) * (y + (x + 1.0d0))))) / (x + y)
else
tmp = (x / y) / (x + (y + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.7e+75) {
tmp = (y / x) / (x + 1.0);
} else if (y <= 3.8e+154) {
tmp = (y * (x / ((x + y) * (y + (x + 1.0))))) / (x + y);
} else {
tmp = (x / y) / (x + (y + 1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.7e+75: tmp = (y / x) / (x + 1.0) elif y <= 3.8e+154: tmp = (y * (x / ((x + y) * (y + (x + 1.0))))) / (x + y) else: tmp = (x / y) / (x + (y + 1.0)) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.7e+75) tmp = Float64(Float64(y / x) / Float64(x + 1.0)); elseif (y <= 3.8e+154) tmp = Float64(Float64(y * Float64(x / Float64(Float64(x + y) * Float64(y + Float64(x + 1.0))))) / Float64(x + y)); else tmp = Float64(Float64(x / y) / Float64(x + Float64(y + 1.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.7e+75) tmp = (y / x) / (x + 1.0); elseif (y <= 3.8e+154) tmp = (y * (x / ((x + y) * (y + (x + 1.0))))) / (x + y); else tmp = (x / y) / (x + (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.7e+75], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e+154], N[(N[(y * N[(x / N[(N[(x + y), $MachinePrecision] * N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+75}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+154}:\\
\;\;\;\;\frac{y \cdot \frac{x}{\left(x + y\right) \cdot \left(y + \left(x + 1\right)\right)}}{x + y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + \left(y + 1\right)}\\
\end{array}
\end{array}
if y < -1.70000000000000006e75Initial program 61.2%
associate-/l*79.7%
associate-+l+79.7%
Simplified79.7%
Taylor expanded in y around 0 19.8%
associate-/r*30.7%
+-commutative30.7%
Simplified30.7%
if -1.70000000000000006e75 < y < 3.7999999999999998e154Initial program 74.9%
*-commutative74.9%
associate-*l*74.9%
times-frac98.5%
+-commutative98.5%
+-commutative98.5%
associate-+r+98.5%
+-commutative98.5%
associate-+l+98.5%
Applied egg-rr98.5%
associate-*l/98.6%
+-commutative98.6%
+-commutative98.6%
+-commutative98.6%
Applied egg-rr98.6%
if 3.7999999999999998e154 < y Initial program 53.1%
*-commutative53.1%
associate-*l*53.1%
times-frac76.1%
+-commutative76.1%
+-commutative76.1%
associate-+r+76.1%
+-commutative76.1%
associate-+l+76.1%
Applied egg-rr76.1%
*-commutative76.1%
associate-/r*99.9%
clear-num99.9%
frac-times98.5%
+-commutative98.5%
+-commutative98.5%
+-commutative98.5%
Applied egg-rr98.5%
*-rgt-identity98.5%
*-commutative98.5%
times-frac99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
*-rgt-identity99.8%
Applied egg-rr99.8%
associate-*l/99.8%
*-lft-identity99.8%
Simplified99.8%
Taylor expanded in x around 0 84.0%
(FPCore (x y)
:precision binary64
(if (<= y -4.1e+105)
(/ (/ y x) (+ x 1.0))
(if (<= y 6.8e+154)
(* (/ y (+ x y)) (/ x (* (+ x y) (+ y (+ x 1.0)))))
(/ (/ x y) (+ x (+ y 1.0))))))
double code(double x, double y) {
double tmp;
if (y <= -4.1e+105) {
tmp = (y / x) / (x + 1.0);
} else if (y <= 6.8e+154) {
tmp = (y / (x + y)) * (x / ((x + y) * (y + (x + 1.0))));
} else {
tmp = (x / y) / (x + (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 <= (-4.1d+105)) then
tmp = (y / x) / (x + 1.0d0)
else if (y <= 6.8d+154) then
tmp = (y / (x + y)) * (x / ((x + y) * (y + (x + 1.0d0))))
else
tmp = (x / y) / (x + (y + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -4.1e+105) {
tmp = (y / x) / (x + 1.0);
} else if (y <= 6.8e+154) {
tmp = (y / (x + y)) * (x / ((x + y) * (y + (x + 1.0))));
} else {
tmp = (x / y) / (x + (y + 1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -4.1e+105: tmp = (y / x) / (x + 1.0) elif y <= 6.8e+154: tmp = (y / (x + y)) * (x / ((x + y) * (y + (x + 1.0)))) else: tmp = (x / y) / (x + (y + 1.0)) return tmp
function code(x, y) tmp = 0.0 if (y <= -4.1e+105) tmp = Float64(Float64(y / x) / Float64(x + 1.0)); elseif (y <= 6.8e+154) tmp = Float64(Float64(y / Float64(x + y)) * Float64(x / Float64(Float64(x + y) * Float64(y + Float64(x + 1.0))))); else tmp = Float64(Float64(x / y) / Float64(x + Float64(y + 1.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -4.1e+105) tmp = (y / x) / (x + 1.0); elseif (y <= 6.8e+154) tmp = (y / (x + y)) * (x / ((x + y) * (y + (x + 1.0)))); else tmp = (x / y) / (x + (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -4.1e+105], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e+154], N[(N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(x / N[(N[(x + y), $MachinePrecision] * N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{+105}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+154}:\\
\;\;\;\;\frac{y}{x + y} \cdot \frac{x}{\left(x + y\right) \cdot \left(y + \left(x + 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + \left(y + 1\right)}\\
\end{array}
\end{array}
if y < -4.1000000000000002e105Initial program 55.8%
associate-/l*75.7%
associate-+l+75.7%
Simplified75.7%
Taylor expanded in y around 0 18.9%
associate-/r*32.0%
+-commutative32.0%
Simplified32.0%
if -4.1000000000000002e105 < y < 6.79999999999999948e154Initial program 75.6%
*-commutative75.6%
associate-*l*75.5%
times-frac98.6%
+-commutative98.6%
+-commutative98.6%
associate-+r+98.6%
+-commutative98.6%
associate-+l+98.6%
Applied egg-rr98.6%
if 6.79999999999999948e154 < y Initial program 53.1%
*-commutative53.1%
associate-*l*53.1%
times-frac76.1%
+-commutative76.1%
+-commutative76.1%
associate-+r+76.1%
+-commutative76.1%
associate-+l+76.1%
Applied egg-rr76.1%
*-commutative76.1%
associate-/r*99.9%
clear-num99.9%
frac-times98.5%
+-commutative98.5%
+-commutative98.5%
+-commutative98.5%
Applied egg-rr98.5%
*-rgt-identity98.5%
*-commutative98.5%
times-frac99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
*-rgt-identity99.8%
Applied egg-rr99.8%
associate-*l/99.8%
*-lft-identity99.8%
Simplified99.8%
Taylor expanded in x around 0 84.0%
Final simplification84.9%
(FPCore (x y)
:precision binary64
(if (<= y -4.1e+105)
(/ (/ y x) (+ x 1.0))
(if (<= y 1.5e+154)
(* (/ x (+ x y)) (/ y (* (+ x y) (+ y (+ x 1.0)))))
(/ (/ x y) (+ x (+ y 1.0))))))
double code(double x, double y) {
double tmp;
if (y <= -4.1e+105) {
tmp = (y / x) / (x + 1.0);
} else if (y <= 1.5e+154) {
tmp = (x / (x + y)) * (y / ((x + y) * (y + (x + 1.0))));
} else {
tmp = (x / y) / (x + (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 <= (-4.1d+105)) then
tmp = (y / x) / (x + 1.0d0)
else if (y <= 1.5d+154) then
tmp = (x / (x + y)) * (y / ((x + y) * (y + (x + 1.0d0))))
else
tmp = (x / y) / (x + (y + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -4.1e+105) {
tmp = (y / x) / (x + 1.0);
} else if (y <= 1.5e+154) {
tmp = (x / (x + y)) * (y / ((x + y) * (y + (x + 1.0))));
} else {
tmp = (x / y) / (x + (y + 1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -4.1e+105: tmp = (y / x) / (x + 1.0) elif y <= 1.5e+154: tmp = (x / (x + y)) * (y / ((x + y) * (y + (x + 1.0)))) else: tmp = (x / y) / (x + (y + 1.0)) return tmp
function code(x, y) tmp = 0.0 if (y <= -4.1e+105) tmp = Float64(Float64(y / x) / Float64(x + 1.0)); elseif (y <= 1.5e+154) tmp = Float64(Float64(x / Float64(x + y)) * Float64(y / Float64(Float64(x + y) * Float64(y + Float64(x + 1.0))))); else tmp = Float64(Float64(x / y) / Float64(x + Float64(y + 1.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -4.1e+105) tmp = (y / x) / (x + 1.0); elseif (y <= 1.5e+154) tmp = (x / (x + y)) * (y / ((x + y) * (y + (x + 1.0)))); else tmp = (x / y) / (x + (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -4.1e+105], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+154], N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(y / N[(N[(x + y), $MachinePrecision] * N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{+105}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+154}:\\
\;\;\;\;\frac{x}{x + y} \cdot \frac{y}{\left(x + y\right) \cdot \left(y + \left(x + 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + \left(y + 1\right)}\\
\end{array}
\end{array}
if y < -4.1000000000000002e105Initial program 55.8%
associate-/l*75.7%
associate-+l+75.7%
Simplified75.7%
Taylor expanded in y around 0 18.9%
associate-/r*32.0%
+-commutative32.0%
Simplified32.0%
if -4.1000000000000002e105 < y < 1.50000000000000013e154Initial program 75.6%
associate-*l*75.5%
times-frac98.6%
+-commutative98.6%
+-commutative98.6%
associate-+r+98.6%
+-commutative98.6%
associate-+l+98.6%
Applied egg-rr98.6%
if 1.50000000000000013e154 < y Initial program 53.1%
*-commutative53.1%
associate-*l*53.1%
times-frac76.1%
+-commutative76.1%
+-commutative76.1%
associate-+r+76.1%
+-commutative76.1%
associate-+l+76.1%
Applied egg-rr76.1%
*-commutative76.1%
associate-/r*99.9%
clear-num99.9%
frac-times98.5%
+-commutative98.5%
+-commutative98.5%
+-commutative98.5%
Applied egg-rr98.5%
*-rgt-identity98.5%
*-commutative98.5%
times-frac99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
*-rgt-identity99.8%
Applied egg-rr99.8%
associate-*l/99.8%
*-lft-identity99.8%
Simplified99.8%
Taylor expanded in x around 0 84.0%
Final simplification84.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ x (+ y 1.0))))
(if (<= y -1.45e-69)
(/ (/ (/ x x) (/ (+ x y) y)) t_0)
(if (<= y 5.8e-15)
(/ y (* (+ x y) (+ (+ x 1.0) (* y (/ 1.0 x)))))
(if (<= y 2.7e+154)
(/ x (* (+ x y) (+ y (+ x 1.0))))
(/ (/ x y) t_0))))))
double code(double x, double y) {
double t_0 = x + (y + 1.0);
double tmp;
if (y <= -1.45e-69) {
tmp = ((x / x) / ((x + y) / y)) / t_0;
} else if (y <= 5.8e-15) {
tmp = y / ((x + y) * ((x + 1.0) + (y * (1.0 / x))));
} else if (y <= 2.7e+154) {
tmp = x / ((x + y) * (y + (x + 1.0)));
} else {
tmp = (x / y) / 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 + 1.0d0)
if (y <= (-1.45d-69)) then
tmp = ((x / x) / ((x + y) / y)) / t_0
else if (y <= 5.8d-15) then
tmp = y / ((x + y) * ((x + 1.0d0) + (y * (1.0d0 / x))))
else if (y <= 2.7d+154) then
tmp = x / ((x + y) * (y + (x + 1.0d0)))
else
tmp = (x / y) / t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x + (y + 1.0);
double tmp;
if (y <= -1.45e-69) {
tmp = ((x / x) / ((x + y) / y)) / t_0;
} else if (y <= 5.8e-15) {
tmp = y / ((x + y) * ((x + 1.0) + (y * (1.0 / x))));
} else if (y <= 2.7e+154) {
tmp = x / ((x + y) * (y + (x + 1.0)));
} else {
tmp = (x / y) / t_0;
}
return tmp;
}
def code(x, y): t_0 = x + (y + 1.0) tmp = 0 if y <= -1.45e-69: tmp = ((x / x) / ((x + y) / y)) / t_0 elif y <= 5.8e-15: tmp = y / ((x + y) * ((x + 1.0) + (y * (1.0 / x)))) elif y <= 2.7e+154: tmp = x / ((x + y) * (y + (x + 1.0))) else: tmp = (x / y) / t_0 return tmp
function code(x, y) t_0 = Float64(x + Float64(y + 1.0)) tmp = 0.0 if (y <= -1.45e-69) tmp = Float64(Float64(Float64(x / x) / Float64(Float64(x + y) / y)) / t_0); elseif (y <= 5.8e-15) tmp = Float64(y / Float64(Float64(x + y) * Float64(Float64(x + 1.0) + Float64(y * Float64(1.0 / x))))); elseif (y <= 2.7e+154) tmp = Float64(x / Float64(Float64(x + y) * Float64(y + Float64(x + 1.0)))); else tmp = Float64(Float64(x / y) / t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = x + (y + 1.0); tmp = 0.0; if (y <= -1.45e-69) tmp = ((x / x) / ((x + y) / y)) / t_0; elseif (y <= 5.8e-15) tmp = y / ((x + y) * ((x + 1.0) + (y * (1.0 / x)))); elseif (y <= 2.7e+154) tmp = x / ((x + y) * (y + (x + 1.0))); else tmp = (x / y) / t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.45e-69], N[(N[(N[(x / x), $MachinePrecision] / N[(N[(x + y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[y, 5.8e-15], N[(y / N[(N[(x + y), $MachinePrecision] * N[(N[(x + 1.0), $MachinePrecision] + N[(y * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e+154], N[(x / N[(N[(x + y), $MachinePrecision] * N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;y \leq -1.45 \cdot 10^{-69}:\\
\;\;\;\;\frac{\frac{\frac{x}{x}}{\frac{x + y}{y}}}{t\_0}\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-15}:\\
\;\;\;\;\frac{y}{\left(x + y\right) \cdot \left(\left(x + 1\right) + y \cdot \frac{1}{x}\right)}\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+154}:\\
\;\;\;\;\frac{x}{\left(x + y\right) \cdot \left(y + \left(x + 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t\_0}\\
\end{array}
\end{array}
if y < -1.4499999999999999e-69Initial program 70.0%
*-commutative70.0%
associate-*l*70.0%
times-frac87.1%
+-commutative87.1%
+-commutative87.1%
associate-+r+87.1%
+-commutative87.1%
associate-+l+87.1%
Applied egg-rr87.1%
*-commutative87.1%
associate-/r*99.8%
clear-num99.8%
frac-times99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
*-rgt-identity99.7%
*-commutative99.7%
times-frac99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
*-rgt-identity99.7%
Applied egg-rr99.7%
associate-*l/99.8%
*-lft-identity99.8%
Simplified99.8%
Taylor expanded in x around inf 40.1%
if -1.4499999999999999e-69 < y < 5.80000000000000037e-15Initial program 68.2%
*-commutative68.2%
associate-*l*68.2%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
*-commutative99.8%
clear-num99.7%
frac-times99.6%
*-un-lft-identity99.6%
+-commutative99.6%
+-commutative99.6%
+-commutative99.6%
Applied egg-rr99.6%
Taylor expanded in y around 0 99.6%
associate-+r+99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in x around 0 99.6%
if 5.80000000000000037e-15 < y < 2.70000000000000006e154Initial program 85.6%
*-commutative85.6%
associate-*l*85.5%
times-frac96.5%
+-commutative96.5%
+-commutative96.5%
associate-+r+96.5%
+-commutative96.5%
associate-+l+96.5%
Applied egg-rr96.5%
Taylor expanded in y around inf 77.4%
if 2.70000000000000006e154 < y Initial program 53.1%
*-commutative53.1%
associate-*l*53.1%
times-frac76.1%
+-commutative76.1%
+-commutative76.1%
associate-+r+76.1%
+-commutative76.1%
associate-+l+76.1%
Applied egg-rr76.1%
*-commutative76.1%
associate-/r*99.9%
clear-num99.9%
frac-times98.5%
+-commutative98.5%
+-commutative98.5%
+-commutative98.5%
Applied egg-rr98.5%
*-rgt-identity98.5%
*-commutative98.5%
times-frac99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
*-rgt-identity99.8%
Applied egg-rr99.8%
associate-*l/99.8%
*-lft-identity99.8%
Simplified99.8%
Taylor expanded in x around 0 84.0%
Final simplification74.6%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ x (+ y 1.0))))
(if (<= y -1.45e-69)
(/ (/ y x) t_0)
(if (<= y 5.8e-15)
(/ y (* (+ x y) (+ (+ x 1.0) (* y (/ 1.0 x)))))
(if (<= y 2.5e+154)
(/ x (* (+ x y) (+ y (+ x 1.0))))
(/ (/ x y) t_0))))))
double code(double x, double y) {
double t_0 = x + (y + 1.0);
double tmp;
if (y <= -1.45e-69) {
tmp = (y / x) / t_0;
} else if (y <= 5.8e-15) {
tmp = y / ((x + y) * ((x + 1.0) + (y * (1.0 / x))));
} else if (y <= 2.5e+154) {
tmp = x / ((x + y) * (y + (x + 1.0)));
} else {
tmp = (x / y) / 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 + 1.0d0)
if (y <= (-1.45d-69)) then
tmp = (y / x) / t_0
else if (y <= 5.8d-15) then
tmp = y / ((x + y) * ((x + 1.0d0) + (y * (1.0d0 / x))))
else if (y <= 2.5d+154) then
tmp = x / ((x + y) * (y + (x + 1.0d0)))
else
tmp = (x / y) / t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x + (y + 1.0);
double tmp;
if (y <= -1.45e-69) {
tmp = (y / x) / t_0;
} else if (y <= 5.8e-15) {
tmp = y / ((x + y) * ((x + 1.0) + (y * (1.0 / x))));
} else if (y <= 2.5e+154) {
tmp = x / ((x + y) * (y + (x + 1.0)));
} else {
tmp = (x / y) / t_0;
}
return tmp;
}
def code(x, y): t_0 = x + (y + 1.0) tmp = 0 if y <= -1.45e-69: tmp = (y / x) / t_0 elif y <= 5.8e-15: tmp = y / ((x + y) * ((x + 1.0) + (y * (1.0 / x)))) elif y <= 2.5e+154: tmp = x / ((x + y) * (y + (x + 1.0))) else: tmp = (x / y) / t_0 return tmp
function code(x, y) t_0 = Float64(x + Float64(y + 1.0)) tmp = 0.0 if (y <= -1.45e-69) tmp = Float64(Float64(y / x) / t_0); elseif (y <= 5.8e-15) tmp = Float64(y / Float64(Float64(x + y) * Float64(Float64(x + 1.0) + Float64(y * Float64(1.0 / x))))); elseif (y <= 2.5e+154) tmp = Float64(x / Float64(Float64(x + y) * Float64(y + Float64(x + 1.0)))); else tmp = Float64(Float64(x / y) / t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = x + (y + 1.0); tmp = 0.0; if (y <= -1.45e-69) tmp = (y / x) / t_0; elseif (y <= 5.8e-15) tmp = y / ((x + y) * ((x + 1.0) + (y * (1.0 / x)))); elseif (y <= 2.5e+154) tmp = x / ((x + y) * (y + (x + 1.0))); else tmp = (x / y) / t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.45e-69], N[(N[(y / x), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[y, 5.8e-15], N[(y / N[(N[(x + y), $MachinePrecision] * N[(N[(x + 1.0), $MachinePrecision] + N[(y * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e+154], N[(x / N[(N[(x + y), $MachinePrecision] * N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;y \leq -1.45 \cdot 10^{-69}:\\
\;\;\;\;\frac{\frac{y}{x}}{t\_0}\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-15}:\\
\;\;\;\;\frac{y}{\left(x + y\right) \cdot \left(\left(x + 1\right) + y \cdot \frac{1}{x}\right)}\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+154}:\\
\;\;\;\;\frac{x}{\left(x + y\right) \cdot \left(y + \left(x + 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t\_0}\\
\end{array}
\end{array}
if y < -1.4499999999999999e-69Initial program 70.0%
*-commutative70.0%
associate-*l*70.0%
times-frac87.1%
+-commutative87.1%
+-commutative87.1%
associate-+r+87.1%
+-commutative87.1%
associate-+l+87.1%
Applied egg-rr87.1%
*-commutative87.1%
associate-/r*99.8%
clear-num99.8%
frac-times99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
*-rgt-identity99.7%
*-commutative99.7%
times-frac99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
*-rgt-identity99.7%
Applied egg-rr99.7%
associate-*l/99.8%
*-lft-identity99.8%
Simplified99.8%
Taylor expanded in x around inf 38.5%
if -1.4499999999999999e-69 < y < 5.80000000000000037e-15Initial program 68.2%
*-commutative68.2%
associate-*l*68.2%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
*-commutative99.8%
clear-num99.7%
frac-times99.6%
*-un-lft-identity99.6%
+-commutative99.6%
+-commutative99.6%
+-commutative99.6%
Applied egg-rr99.6%
Taylor expanded in y around 0 99.6%
associate-+r+99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in x around 0 99.6%
if 5.80000000000000037e-15 < y < 2.50000000000000002e154Initial program 85.6%
*-commutative85.6%
associate-*l*85.5%
times-frac96.5%
+-commutative96.5%
+-commutative96.5%
associate-+r+96.5%
+-commutative96.5%
associate-+l+96.5%
Applied egg-rr96.5%
Taylor expanded in y around inf 77.4%
if 2.50000000000000002e154 < y Initial program 53.1%
*-commutative53.1%
associate-*l*53.1%
times-frac76.1%
+-commutative76.1%
+-commutative76.1%
associate-+r+76.1%
+-commutative76.1%
associate-+l+76.1%
Applied egg-rr76.1%
*-commutative76.1%
associate-/r*99.9%
clear-num99.9%
frac-times98.5%
+-commutative98.5%
+-commutative98.5%
+-commutative98.5%
Applied egg-rr98.5%
*-rgt-identity98.5%
*-commutative98.5%
times-frac99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
*-rgt-identity99.8%
Applied egg-rr99.8%
associate-*l/99.8%
*-lft-identity99.8%
Simplified99.8%
Taylor expanded in x around 0 84.0%
Final simplification74.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ x (+ y 1.0))))
(if (<= y 9e-163)
(/ (/ y x) t_0)
(if (<= y 5.8e-15)
(* x (/ y (* (+ x 1.0) (* (+ x y) (+ x y)))))
(if (<= y 1.35e+154)
(/ x (* (+ x y) (+ y (+ x 1.0))))
(/ (/ x y) t_0))))))
double code(double x, double y) {
double t_0 = x + (y + 1.0);
double tmp;
if (y <= 9e-163) {
tmp = (y / x) / t_0;
} else if (y <= 5.8e-15) {
tmp = x * (y / ((x + 1.0) * ((x + y) * (x + y))));
} else if (y <= 1.35e+154) {
tmp = x / ((x + y) * (y + (x + 1.0)));
} else {
tmp = (x / y) / 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 + 1.0d0)
if (y <= 9d-163) then
tmp = (y / x) / t_0
else if (y <= 5.8d-15) then
tmp = x * (y / ((x + 1.0d0) * ((x + y) * (x + y))))
else if (y <= 1.35d+154) then
tmp = x / ((x + y) * (y + (x + 1.0d0)))
else
tmp = (x / y) / t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x + (y + 1.0);
double tmp;
if (y <= 9e-163) {
tmp = (y / x) / t_0;
} else if (y <= 5.8e-15) {
tmp = x * (y / ((x + 1.0) * ((x + y) * (x + y))));
} else if (y <= 1.35e+154) {
tmp = x / ((x + y) * (y + (x + 1.0)));
} else {
tmp = (x / y) / t_0;
}
return tmp;
}
def code(x, y): t_0 = x + (y + 1.0) tmp = 0 if y <= 9e-163: tmp = (y / x) / t_0 elif y <= 5.8e-15: tmp = x * (y / ((x + 1.0) * ((x + y) * (x + y)))) elif y <= 1.35e+154: tmp = x / ((x + y) * (y + (x + 1.0))) else: tmp = (x / y) / t_0 return tmp
function code(x, y) t_0 = Float64(x + Float64(y + 1.0)) tmp = 0.0 if (y <= 9e-163) tmp = Float64(Float64(y / x) / t_0); elseif (y <= 5.8e-15) tmp = Float64(x * Float64(y / Float64(Float64(x + 1.0) * Float64(Float64(x + y) * Float64(x + y))))); elseif (y <= 1.35e+154) tmp = Float64(x / Float64(Float64(x + y) * Float64(y + Float64(x + 1.0)))); else tmp = Float64(Float64(x / y) / t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = x + (y + 1.0); tmp = 0.0; if (y <= 9e-163) tmp = (y / x) / t_0; elseif (y <= 5.8e-15) tmp = x * (y / ((x + 1.0) * ((x + y) * (x + y)))); elseif (y <= 1.35e+154) tmp = x / ((x + y) * (y + (x + 1.0))); else tmp = (x / y) / t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 9e-163], N[(N[(y / x), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[y, 5.8e-15], N[(x * N[(y / N[(N[(x + 1.0), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e+154], N[(x / N[(N[(x + y), $MachinePrecision] * N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / t$95$0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;y \leq 9 \cdot 10^{-163}:\\
\;\;\;\;\frac{\frac{y}{x}}{t\_0}\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-15}:\\
\;\;\;\;x \cdot \frac{y}{\left(x + 1\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right)\right)}\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{x}{\left(x + y\right) \cdot \left(y + \left(x + 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t\_0}\\
\end{array}
\end{array}
if y < 8.9999999999999995e-163Initial program 65.4%
*-commutative65.4%
associate-*l*65.4%
times-frac93.0%
+-commutative93.0%
+-commutative93.0%
associate-+r+93.0%
+-commutative93.0%
associate-+l+93.0%
Applied egg-rr93.0%
*-commutative93.0%
associate-/r*99.8%
clear-num99.8%
frac-times99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
*-rgt-identity99.7%
*-commutative99.7%
times-frac99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
*-rgt-identity99.7%
Applied egg-rr99.7%
associate-*l/99.8%
*-lft-identity99.8%
Simplified99.8%
Taylor expanded in x around inf 54.4%
if 8.9999999999999995e-163 < y < 5.80000000000000037e-15Initial program 91.3%
associate-/l*96.0%
associate-+l+96.0%
Simplified96.0%
Taylor expanded in y around 0 96.0%
+-commutative96.0%
Simplified96.0%
if 5.80000000000000037e-15 < y < 1.35000000000000003e154Initial program 85.6%
*-commutative85.6%
associate-*l*85.5%
times-frac96.5%
+-commutative96.5%
+-commutative96.5%
associate-+r+96.5%
+-commutative96.5%
associate-+l+96.5%
Applied egg-rr96.5%
Taylor expanded in y around inf 77.4%
if 1.35000000000000003e154 < y Initial program 53.1%
*-commutative53.1%
associate-*l*53.1%
times-frac76.1%
+-commutative76.1%
+-commutative76.1%
associate-+r+76.1%
+-commutative76.1%
associate-+l+76.1%
Applied egg-rr76.1%
*-commutative76.1%
associate-/r*99.9%
clear-num99.9%
frac-times98.5%
+-commutative98.5%
+-commutative98.5%
+-commutative98.5%
Applied egg-rr98.5%
*-rgt-identity98.5%
*-commutative98.5%
times-frac99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
*-rgt-identity99.8%
Applied egg-rr99.8%
associate-*l/99.8%
*-lft-identity99.8%
Simplified99.8%
Taylor expanded in x around 0 84.0%
Final simplification65.7%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ x (+ y 1.0))))
(if (<= y 1.4e-169)
(/ (/ y x) t_0)
(if (<= y 1.4e+154) (/ x (* (+ x y) (+ y (+ x 1.0)))) (/ (/ x y) t_0)))))
double code(double x, double y) {
double t_0 = x + (y + 1.0);
double tmp;
if (y <= 1.4e-169) {
tmp = (y / x) / t_0;
} else if (y <= 1.4e+154) {
tmp = x / ((x + y) * (y + (x + 1.0)));
} else {
tmp = (x / y) / 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 + 1.0d0)
if (y <= 1.4d-169) then
tmp = (y / x) / t_0
else if (y <= 1.4d+154) then
tmp = x / ((x + y) * (y + (x + 1.0d0)))
else
tmp = (x / y) / t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x + (y + 1.0);
double tmp;
if (y <= 1.4e-169) {
tmp = (y / x) / t_0;
} else if (y <= 1.4e+154) {
tmp = x / ((x + y) * (y + (x + 1.0)));
} else {
tmp = (x / y) / t_0;
}
return tmp;
}
def code(x, y): t_0 = x + (y + 1.0) tmp = 0 if y <= 1.4e-169: tmp = (y / x) / t_0 elif y <= 1.4e+154: tmp = x / ((x + y) * (y + (x + 1.0))) else: tmp = (x / y) / t_0 return tmp
function code(x, y) t_0 = Float64(x + Float64(y + 1.0)) tmp = 0.0 if (y <= 1.4e-169) tmp = Float64(Float64(y / x) / t_0); elseif (y <= 1.4e+154) tmp = Float64(x / Float64(Float64(x + y) * Float64(y + Float64(x + 1.0)))); else tmp = Float64(Float64(x / y) / t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = x + (y + 1.0); tmp = 0.0; if (y <= 1.4e-169) tmp = (y / x) / t_0; elseif (y <= 1.4e+154) tmp = x / ((x + y) * (y + (x + 1.0))); else tmp = (x / y) / t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 1.4e-169], N[(N[(y / x), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[y, 1.4e+154], N[(x / N[(N[(x + y), $MachinePrecision] * N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;y \leq 1.4 \cdot 10^{-169}:\\
\;\;\;\;\frac{\frac{y}{x}}{t\_0}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+154}:\\
\;\;\;\;\frac{x}{\left(x + y\right) \cdot \left(y + \left(x + 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t\_0}\\
\end{array}
\end{array}
if y < 1.39999999999999994e-169Initial program 66.0%
*-commutative66.0%
associate-*l*66.0%
times-frac92.9%
+-commutative92.9%
+-commutative92.9%
associate-+r+92.9%
+-commutative92.9%
associate-+l+92.9%
Applied egg-rr92.9%
*-commutative92.9%
associate-/r*99.8%
clear-num99.8%
frac-times99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
*-rgt-identity99.7%
*-commutative99.7%
times-frac99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
*-rgt-identity99.7%
Applied egg-rr99.7%
associate-*l/99.8%
*-lft-identity99.8%
Simplified99.8%
Taylor expanded in x around inf 54.7%
if 1.39999999999999994e-169 < y < 1.4e154Initial program 85.5%
*-commutative85.5%
associate-*l*85.4%
times-frac98.0%
+-commutative98.0%
+-commutative98.0%
associate-+r+98.0%
+-commutative98.0%
associate-+l+98.0%
Applied egg-rr98.0%
Taylor expanded in y around inf 77.2%
if 1.4e154 < y Initial program 53.1%
*-commutative53.1%
associate-*l*53.1%
times-frac76.1%
+-commutative76.1%
+-commutative76.1%
associate-+r+76.1%
+-commutative76.1%
associate-+l+76.1%
Applied egg-rr76.1%
*-commutative76.1%
associate-/r*99.9%
clear-num99.9%
frac-times98.5%
+-commutative98.5%
+-commutative98.5%
+-commutative98.5%
Applied egg-rr98.5%
*-rgt-identity98.5%
*-commutative98.5%
times-frac99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
*-rgt-identity99.8%
Applied egg-rr99.8%
associate-*l/99.8%
*-lft-identity99.8%
Simplified99.8%
Taylor expanded in x around 0 84.0%
Final simplification64.3%
(FPCore (x y) :precision binary64 (if (<= y 5.2e-85) (/ (/ y x) (+ x 1.0)) (if (<= y 6e+103) (/ x (* y (+ y 1.0))) (/ (/ x y) y))))
double code(double x, double y) {
double tmp;
if (y <= 5.2e-85) {
tmp = (y / x) / (x + 1.0);
} else if (y <= 6e+103) {
tmp = x / (y * (y + 1.0));
} 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 <= 5.2d-85) then
tmp = (y / x) / (x + 1.0d0)
else if (y <= 6d+103) then
tmp = x / (y * (y + 1.0d0))
else
tmp = (x / y) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 5.2e-85) {
tmp = (y / x) / (x + 1.0);
} else if (y <= 6e+103) {
tmp = x / (y * (y + 1.0));
} else {
tmp = (x / y) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 5.2e-85: tmp = (y / x) / (x + 1.0) elif y <= 6e+103: tmp = x / (y * (y + 1.0)) else: tmp = (x / y) / y return tmp
function code(x, y) tmp = 0.0 if (y <= 5.2e-85) tmp = Float64(Float64(y / x) / Float64(x + 1.0)); elseif (y <= 6e+103) tmp = Float64(x / Float64(y * Float64(y + 1.0))); else tmp = Float64(Float64(x / y) / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 5.2e-85) tmp = (y / x) / (x + 1.0); elseif (y <= 6e+103) tmp = x / (y * (y + 1.0)); else tmp = (x / y) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 5.2e-85], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e+103], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.2 \cdot 10^{-85}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+103}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if y < 5.20000000000000023e-85Initial program 66.7%
associate-/l*79.1%
associate-+l+79.1%
Simplified79.1%
Taylor expanded in y around 0 51.9%
associate-/r*55.8%
+-commutative55.8%
Simplified55.8%
if 5.20000000000000023e-85 < y < 6e103Initial program 92.5%
associate-/l*92.5%
associate-+l+92.5%
Simplified92.5%
Taylor expanded in x around 0 61.0%
+-commutative61.0%
Simplified61.0%
if 6e103 < y Initial program 56.2%
associate-/l*75.6%
associate-+l+75.6%
Simplified75.6%
Taylor expanded in x around 0 77.9%
associate-/r*77.9%
+-commutative77.9%
Simplified77.9%
associate-*r/84.2%
frac-2neg84.2%
Applied egg-rr84.2%
associate-*r/84.2%
*-rgt-identity84.2%
+-commutative84.2%
mul-1-neg84.2%
distribute-lft-in84.2%
metadata-eval84.2%
neg-mul-184.2%
unsub-neg84.2%
Simplified84.2%
Taylor expanded in y around inf 84.2%
neg-mul-184.2%
Simplified84.2%
Final simplification61.3%
(FPCore (x y) :precision binary64 (if (<= y 4.9e-85) (/ y (* x (+ x 1.0))) (if (<= y 6.1e+103) (/ x (* y (+ y 1.0))) (/ (/ x y) y))))
double code(double x, double y) {
double tmp;
if (y <= 4.9e-85) {
tmp = y / (x * (x + 1.0));
} else if (y <= 6.1e+103) {
tmp = x / (y * (y + 1.0));
} 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 <= 4.9d-85) then
tmp = y / (x * (x + 1.0d0))
else if (y <= 6.1d+103) then
tmp = x / (y * (y + 1.0d0))
else
tmp = (x / y) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 4.9e-85) {
tmp = y / (x * (x + 1.0));
} else if (y <= 6.1e+103) {
tmp = x / (y * (y + 1.0));
} else {
tmp = (x / y) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 4.9e-85: tmp = y / (x * (x + 1.0)) elif y <= 6.1e+103: tmp = x / (y * (y + 1.0)) else: tmp = (x / y) / y return tmp
function code(x, y) tmp = 0.0 if (y <= 4.9e-85) tmp = Float64(y / Float64(x * Float64(x + 1.0))); elseif (y <= 6.1e+103) tmp = Float64(x / Float64(y * Float64(y + 1.0))); else tmp = Float64(Float64(x / y) / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 4.9e-85) tmp = y / (x * (x + 1.0)); elseif (y <= 6.1e+103) tmp = x / (y * (y + 1.0)); else tmp = (x / y) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 4.9e-85], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.1e+103], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.9 \cdot 10^{-85}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{elif}\;y \leq 6.1 \cdot 10^{+103}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if y < 4.90000000000000015e-85Initial program 66.7%
associate-/l*79.1%
associate-+l+79.1%
Simplified79.1%
Taylor expanded in y around 0 51.9%
if 4.90000000000000015e-85 < y < 6.1000000000000002e103Initial program 92.5%
associate-/l*92.5%
associate-+l+92.5%
Simplified92.5%
Taylor expanded in x around 0 61.0%
+-commutative61.0%
Simplified61.0%
if 6.1000000000000002e103 < y Initial program 56.2%
associate-/l*75.6%
associate-+l+75.6%
Simplified75.6%
Taylor expanded in x around 0 77.9%
associate-/r*77.9%
+-commutative77.9%
Simplified77.9%
associate-*r/84.2%
frac-2neg84.2%
Applied egg-rr84.2%
associate-*r/84.2%
*-rgt-identity84.2%
+-commutative84.2%
mul-1-neg84.2%
distribute-lft-in84.2%
metadata-eval84.2%
neg-mul-184.2%
unsub-neg84.2%
Simplified84.2%
Taylor expanded in y around inf 84.2%
neg-mul-184.2%
Simplified84.2%
Final simplification58.6%
(FPCore (x y) :precision binary64 (if (<= y 6.8e-100) (/ (/ y x) (+ x (+ y 1.0))) (/ (/ x (+ x y)) (+ y 1.0))))
double code(double x, double y) {
double tmp;
if (y <= 6.8e-100) {
tmp = (y / x) / (x + (y + 1.0));
} else {
tmp = (x / (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 <= 6.8d-100) then
tmp = (y / x) / (x + (y + 1.0d0))
else
tmp = (x / (x + y)) / (y + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 6.8e-100) {
tmp = (y / x) / (x + (y + 1.0));
} else {
tmp = (x / (x + y)) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 6.8e-100: tmp = (y / x) / (x + (y + 1.0)) else: tmp = (x / (x + y)) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (y <= 6.8e-100) tmp = Float64(Float64(y / x) / Float64(x + Float64(y + 1.0))); else tmp = Float64(Float64(x / Float64(x + y)) / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 6.8e-100) tmp = (y / x) / (x + (y + 1.0)); else tmp = (x / (x + y)) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 6.8e-100], N[(N[(y / x), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.8 \cdot 10^{-100}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{x + y}}{y + 1}\\
\end{array}
\end{array}
if y < 6.79999999999999953e-100Initial program 66.6%
*-commutative66.6%
associate-*l*66.5%
times-frac93.5%
+-commutative93.5%
+-commutative93.5%
associate-+r+93.5%
+-commutative93.5%
associate-+l+93.5%
Applied egg-rr93.5%
*-commutative93.5%
associate-/r*99.8%
clear-num99.8%
frac-times99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
*-rgt-identity99.8%
*-commutative99.8%
times-frac99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
*-rgt-identity99.7%
Applied egg-rr99.7%
associate-*l/99.8%
*-lft-identity99.8%
Simplified99.8%
Taylor expanded in x around inf 55.9%
if 6.79999999999999953e-100 < y Initial program 74.2%
*-commutative74.2%
associate-*l*74.2%
times-frac88.5%
+-commutative88.5%
+-commutative88.5%
associate-+r+88.5%
+-commutative88.5%
associate-+l+88.5%
Applied egg-rr88.5%
*-commutative88.5%
associate-/r*99.8%
clear-num99.8%
frac-times99.1%
+-commutative99.1%
+-commutative99.1%
+-commutative99.1%
Applied egg-rr99.1%
Taylor expanded in x around 0 72.7%
+-commutative72.7%
Simplified72.7%
Final simplification61.3%
(FPCore (x y) :precision binary64 (let* ((t_0 (+ x (+ y 1.0)))) (if (<= y 5e-85) (/ (/ y x) t_0) (/ (/ x y) t_0))))
double code(double x, double y) {
double t_0 = x + (y + 1.0);
double tmp;
if (y <= 5e-85) {
tmp = (y / x) / t_0;
} else {
tmp = (x / y) / 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 + 1.0d0)
if (y <= 5d-85) then
tmp = (y / x) / t_0
else
tmp = (x / y) / t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x + (y + 1.0);
double tmp;
if (y <= 5e-85) {
tmp = (y / x) / t_0;
} else {
tmp = (x / y) / t_0;
}
return tmp;
}
def code(x, y): t_0 = x + (y + 1.0) tmp = 0 if y <= 5e-85: tmp = (y / x) / t_0 else: tmp = (x / y) / t_0 return tmp
function code(x, y) t_0 = Float64(x + Float64(y + 1.0)) tmp = 0.0 if (y <= 5e-85) tmp = Float64(Float64(y / x) / t_0); else tmp = Float64(Float64(x / y) / t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = x + (y + 1.0); tmp = 0.0; if (y <= 5e-85) tmp = (y / x) / t_0; else tmp = (x / y) / t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 5e-85], N[(N[(y / x), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;y \leq 5 \cdot 10^{-85}:\\
\;\;\;\;\frac{\frac{y}{x}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{t\_0}\\
\end{array}
\end{array}
if y < 5.0000000000000002e-85Initial program 66.7%
*-commutative66.7%
associate-*l*66.7%
times-frac93.5%
+-commutative93.5%
+-commutative93.5%
associate-+r+93.5%
+-commutative93.5%
associate-+l+93.5%
Applied egg-rr93.5%
*-commutative93.5%
associate-/r*99.8%
clear-num99.8%
frac-times99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
*-rgt-identity99.8%
*-commutative99.8%
times-frac99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
*-rgt-identity99.7%
Applied egg-rr99.7%
associate-*l/99.8%
*-lft-identity99.8%
Simplified99.8%
Taylor expanded in x around inf 56.1%
if 5.0000000000000002e-85 < y Initial program 73.9%
*-commutative73.9%
associate-*l*73.8%
times-frac88.3%
+-commutative88.3%
+-commutative88.3%
associate-+r+88.3%
+-commutative88.3%
associate-+l+88.3%
Applied egg-rr88.3%
*-commutative88.3%
associate-/r*99.8%
clear-num99.8%
frac-times99.1%
+-commutative99.1%
+-commutative99.1%
+-commutative99.1%
Applied egg-rr99.1%
*-rgt-identity99.1%
*-commutative99.1%
times-frac99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
*-rgt-identity99.7%
Applied egg-rr99.7%
associate-*l/99.7%
*-lft-identity99.7%
Simplified99.7%
Taylor expanded in x around 0 73.4%
(FPCore (x y) :precision binary64 (if (<= y 5.2e-85) (/ (/ y x) (+ x 1.0)) (/ (/ x y) (+ x (+ y 1.0)))))
double code(double x, double y) {
double tmp;
if (y <= 5.2e-85) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / y) / (x + (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 <= 5.2d-85) then
tmp = (y / x) / (x + 1.0d0)
else
tmp = (x / y) / (x + (y + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 5.2e-85) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / y) / (x + (y + 1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 5.2e-85: tmp = (y / x) / (x + 1.0) else: tmp = (x / y) / (x + (y + 1.0)) return tmp
function code(x, y) tmp = 0.0 if (y <= 5.2e-85) tmp = Float64(Float64(y / x) / Float64(x + 1.0)); else tmp = Float64(Float64(x / y) / Float64(x + Float64(y + 1.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 5.2e-85) tmp = (y / x) / (x + 1.0); else tmp = (x / y) / (x + (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 5.2e-85], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.2 \cdot 10^{-85}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{x + \left(y + 1\right)}\\
\end{array}
\end{array}
if y < 5.20000000000000023e-85Initial program 66.7%
associate-/l*79.1%
associate-+l+79.1%
Simplified79.1%
Taylor expanded in y around 0 51.9%
associate-/r*55.8%
+-commutative55.8%
Simplified55.8%
if 5.20000000000000023e-85 < y Initial program 73.9%
*-commutative73.9%
associate-*l*73.8%
times-frac88.3%
+-commutative88.3%
+-commutative88.3%
associate-+r+88.3%
+-commutative88.3%
associate-+l+88.3%
Applied egg-rr88.3%
*-commutative88.3%
associate-/r*99.8%
clear-num99.8%
frac-times99.1%
+-commutative99.1%
+-commutative99.1%
+-commutative99.1%
Applied egg-rr99.1%
*-rgt-identity99.1%
*-commutative99.1%
times-frac99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
*-rgt-identity99.7%
Applied egg-rr99.7%
associate-*l/99.7%
*-lft-identity99.7%
Simplified99.7%
Taylor expanded in x around 0 73.4%
(FPCore (x y) :precision binary64 (if (<= y 5.2e-85) (/ (/ y x) (+ x 1.0)) (/ (/ x y) (+ y 1.0))))
double code(double x, double y) {
double tmp;
if (y <= 5.2e-85) {
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 (y <= 5.2d-85) 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 (y <= 5.2e-85) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 5.2e-85: tmp = (y / x) / (x + 1.0) else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (y <= 5.2e-85) 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 (y <= 5.2e-85) tmp = (y / x) / (x + 1.0); else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 5.2e-85], 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}\;y \leq 5.2 \cdot 10^{-85}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if y < 5.20000000000000023e-85Initial program 66.7%
associate-/l*79.1%
associate-+l+79.1%
Simplified79.1%
Taylor expanded in y around 0 51.9%
associate-/r*55.8%
+-commutative55.8%
Simplified55.8%
if 5.20000000000000023e-85 < y Initial program 73.9%
associate-/l*83.8%
associate-+l+83.8%
Simplified83.8%
Taylor expanded in x around 0 69.6%
associate-/r*69.7%
+-commutative69.7%
Simplified69.7%
associate-*r/72.8%
frac-2neg72.8%
Applied egg-rr72.8%
associate-*r/72.9%
*-rgt-identity72.9%
+-commutative72.9%
mul-1-neg72.9%
distribute-lft-in72.9%
metadata-eval72.9%
neg-mul-172.9%
unsub-neg72.9%
Simplified72.9%
Final simplification61.3%
(FPCore (x y) :precision binary64 (if (<= y 5.2e-85) (/ y (* x (+ x 1.0))) (/ x (* y (+ y 1.0)))))
double code(double x, double y) {
double tmp;
if (y <= 5.2e-85) {
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 (y <= 5.2d-85) 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 (y <= 5.2e-85) {
tmp = y / (x * (x + 1.0));
} else {
tmp = x / (y * (y + 1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 5.2e-85: tmp = y / (x * (x + 1.0)) else: tmp = x / (y * (y + 1.0)) return tmp
function code(x, y) tmp = 0.0 if (y <= 5.2e-85) 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 (y <= 5.2e-85) tmp = y / (x * (x + 1.0)); else tmp = x / (y * (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 5.2e-85], 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}\;y \leq 5.2 \cdot 10^{-85}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\end{array}
\end{array}
if y < 5.20000000000000023e-85Initial program 66.7%
associate-/l*79.1%
associate-+l+79.1%
Simplified79.1%
Taylor expanded in y around 0 51.9%
if 5.20000000000000023e-85 < y Initial program 73.9%
associate-/l*83.8%
associate-+l+83.8%
Simplified83.8%
Taylor expanded in x around 0 69.7%
+-commutative69.7%
Simplified69.7%
Final simplification57.6%
(FPCore (x y) :precision binary64 (if (<= x -1.1) (/ 1.0 x) (/ x y)))
double code(double x, double y) {
double tmp;
if (x <= -1.1) {
tmp = 1.0 / 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.1d0)) then
tmp = 1.0d0 / x
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.1) {
tmp = 1.0 / x;
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.1: tmp = 1.0 / x else: tmp = x / y return tmp
function code(x, y) tmp = 0.0 if (x <= -1.1) tmp = Float64(1.0 / x); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.1) tmp = 1.0 / x; else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.1], N[(1.0 / x), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1:\\
\;\;\;\;\frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if x < -1.1000000000000001Initial program 62.6%
Taylor expanded in x around inf 58.0%
Taylor expanded in x around inf 57.9%
Taylor expanded in y around inf 6.6%
if -1.1000000000000001 < x Initial program 71.1%
associate-/l*82.7%
associate-+l+82.7%
Simplified82.7%
Taylor expanded in x around 0 62.5%
+-commutative62.5%
Simplified62.5%
Taylor expanded in y around 0 35.6%
(FPCore (x y) :precision binary64 (/ x (* y (+ y 1.0))))
double code(double x, double y) {
return x / (y * (y + 1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x / (y * (y + 1.0d0))
end function
public static double code(double x, double y) {
return x / (y * (y + 1.0));
}
def code(x, y): return x / (y * (y + 1.0))
function code(x, y) return Float64(x / Float64(y * Float64(y + 1.0))) end
function tmp = code(x, y) tmp = x / (y * (y + 1.0)); end
code[x_, y_] := N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y \cdot \left(y + 1\right)}
\end{array}
Initial program 69.0%
associate-/l*80.6%
associate-+l+80.6%
Simplified80.6%
Taylor expanded in x around 0 52.0%
+-commutative52.0%
Simplified52.0%
(FPCore (x y) :precision binary64 (/ 1.0 x))
double code(double x, double y) {
return 1.0 / x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 / x
end function
public static double code(double x, double y) {
return 1.0 / x;
}
def code(x, y): return 1.0 / x
function code(x, y) return Float64(1.0 / x) end
function tmp = code(x, y) tmp = 1.0 / x; end
code[x_, y_] := N[(1.0 / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{x}
\end{array}
Initial program 69.0%
Taylor expanded in x around inf 37.4%
Taylor expanded in x around inf 31.5%
Taylor expanded in y around inf 4.4%
(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 69.0%
*-commutative69.0%
associate-*l*69.0%
times-frac91.9%
+-commutative91.9%
+-commutative91.9%
associate-+r+91.9%
+-commutative91.9%
associate-+l+91.9%
Applied egg-rr91.9%
Taylor expanded in x around 0 52.0%
Taylor expanded in y around 0 3.5%
(FPCore (x y) :precision binary64 (/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x)))))
double code(double x, double y) {
return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x / ((y + 1.0d0) + x)) / (y + x)) / (1.0d0 / (y / (y + x)))
end function
public static double code(double x, double y) {
return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
def code(x, y): return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)))
function code(x, y) return Float64(Float64(Float64(x / Float64(Float64(y + 1.0) + x)) / Float64(y + x)) / Float64(1.0 / Float64(y / Float64(y + x)))) end
function tmp = code(x, y) tmp = ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x))); end
code[x_, y_] := N[(N[(N[(x / N[(N[(y + 1.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{\frac{x}{\left(y + 1\right) + x}}{y + x}}{\frac{1}{\frac{y}{y + x}}}
\end{array}
herbie shell --seed 2024118
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:precision binary64
:alt
(! :herbie-platform default (/ (/ (/ x (+ (+ y 1) x)) (+ y x)) (/ 1 (/ y (+ y x)))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))