
(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 25 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0d0))
end function
public static double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
def code(x, y): return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
function code(x, y) return Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(Float64(x + y) + 1.0))) end
function tmp = code(x, y) tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0)); end
code[x_, y_] := N[(N[(x * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\end{array}
(FPCore (x y) :precision binary64 (/ (* (/ y (+ y x)) (/ x (+ x (+ y 1.0)))) (+ y x)))
double code(double x, double y) {
return ((y / (y + x)) * (x / (x + (y + 1.0)))) / (y + x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((y / (y + x)) * (x / (x + (y + 1.0d0)))) / (y + x)
end function
public static double code(double x, double y) {
return ((y / (y + x)) * (x / (x + (y + 1.0)))) / (y + x);
}
def code(x, y): return ((y / (y + x)) * (x / (x + (y + 1.0)))) / (y + x)
function code(x, y) return Float64(Float64(Float64(y / Float64(y + x)) * Float64(x / Float64(x + Float64(y + 1.0)))) / Float64(y + x)) end
function tmp = code(x, y) tmp = ((y / (y + x)) * (x / (x + (y + 1.0)))) / (y + x); end
code[x_, y_] := N[(N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(x / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{y}{y + x} \cdot \frac{x}{x + \left(y + 1\right)}}{y + x}
\end{array}
Initial program 68.2%
associate-/r*73.5%
+-commutative73.5%
+-commutative73.5%
+-commutative73.5%
associate-/l/68.2%
times-frac88.0%
*-commutative88.0%
+-commutative88.0%
+-commutative88.0%
+-commutative88.0%
associate-+l+88.0%
Simplified88.0%
associate-/r*99.8%
div-inv99.7%
Applied egg-rr99.7%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
associate-*l/99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ y x))))
(if (<= x -14000000.0)
(* (* t_0 (/ 1.0 (+ y x))) (/ y x))
(if (<= x -5.2e-178)
(* (/ x (+ y 1.0)) (/ y (* (+ y x) (+ y x))))
(/ t_0 (+ y (+ x (+ x 1.0))))))))
double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (x <= -14000000.0) {
tmp = (t_0 * (1.0 / (y + x))) * (y / x);
} else if (x <= -5.2e-178) {
tmp = (x / (y + 1.0)) * (y / ((y + x) * (y + x)));
} else {
tmp = t_0 / (y + (x + (x + 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 / (y + x)
if (x <= (-14000000.0d0)) then
tmp = (t_0 * (1.0d0 / (y + x))) * (y / x)
else if (x <= (-5.2d-178)) then
tmp = (x / (y + 1.0d0)) * (y / ((y + x) * (y + x)))
else
tmp = t_0 / (y + (x + (x + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (x <= -14000000.0) {
tmp = (t_0 * (1.0 / (y + x))) * (y / x);
} else if (x <= -5.2e-178) {
tmp = (x / (y + 1.0)) * (y / ((y + x) * (y + x)));
} else {
tmp = t_0 / (y + (x + (x + 1.0)));
}
return tmp;
}
def code(x, y): t_0 = x / (y + x) tmp = 0 if x <= -14000000.0: tmp = (t_0 * (1.0 / (y + x))) * (y / x) elif x <= -5.2e-178: tmp = (x / (y + 1.0)) * (y / ((y + x) * (y + x))) else: tmp = t_0 / (y + (x + (x + 1.0))) return tmp
function code(x, y) t_0 = Float64(x / Float64(y + x)) tmp = 0.0 if (x <= -14000000.0) tmp = Float64(Float64(t_0 * Float64(1.0 / Float64(y + x))) * Float64(y / x)); elseif (x <= -5.2e-178) tmp = Float64(Float64(x / Float64(y + 1.0)) * Float64(y / Float64(Float64(y + x) * Float64(y + x)))); else tmp = Float64(t_0 / Float64(y + Float64(x + Float64(x + 1.0)))); end return tmp end
function tmp_2 = code(x, y) t_0 = x / (y + x); tmp = 0.0; if (x <= -14000000.0) tmp = (t_0 * (1.0 / (y + x))) * (y / x); elseif (x <= -5.2e-178) tmp = (x / (y + 1.0)) * (y / ((y + x) * (y + x))); else tmp = t_0 / (y + (x + (x + 1.0))); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -14000000.0], N[(N[(t$95$0 * N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.2e-178], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] * N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[(y + N[(x + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{y + x}\\
\mathbf{if}\;x \leq -14000000:\\
\;\;\;\;\left(t_0 \cdot \frac{1}{y + x}\right) \cdot \frac{y}{x}\\
\mathbf{elif}\;x \leq -5.2 \cdot 10^{-178}:\\
\;\;\;\;\frac{x}{y + 1} \cdot \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{y + \left(x + \left(x + 1\right)\right)}\\
\end{array}
\end{array}
if x < -1.4e7Initial program 61.8%
times-frac83.5%
associate-+l+83.5%
Simplified83.5%
Taylor expanded in x around inf 77.2%
associate-/r*84.2%
div-inv84.2%
Applied egg-rr84.2%
if -1.4e7 < x < -5.19999999999999997e-178Initial program 83.5%
associate-/r*88.1%
+-commutative88.1%
+-commutative88.1%
+-commutative88.1%
associate-/l/83.5%
times-frac99.4%
*-commutative99.4%
+-commutative99.4%
+-commutative99.4%
+-commutative99.4%
associate-+l+99.4%
Simplified99.4%
Taylor expanded in x around 0 98.5%
+-commutative98.5%
Simplified98.5%
if -5.19999999999999997e-178 < x Initial program 67.0%
associate-/r*72.7%
+-commutative72.7%
+-commutative72.7%
+-commutative72.7%
associate-/r*67.0%
associate-*l/79.7%
*-commutative79.7%
*-commutative79.7%
distribute-rgt1-in72.3%
fma-def79.7%
+-commutative79.7%
+-commutative79.7%
cube-unmult79.7%
+-commutative79.7%
Simplified79.7%
associate-*r/66.9%
fma-udef61.1%
cube-mult61.1%
distribute-rgt1-in67.0%
associate-+r+67.0%
*-commutative67.0%
*-commutative67.0%
frac-times87.0%
associate-/r*99.8%
clear-num99.8%
frac-times99.6%
*-un-lft-identity99.6%
Applied egg-rr99.6%
Taylor expanded in y around -inf 60.0%
mul-1-neg60.0%
unsub-neg60.0%
neg-mul-160.0%
unsub-neg60.0%
distribute-lft-in60.0%
metadata-eval60.0%
neg-mul-160.0%
unsub-neg60.0%
Simplified60.0%
Final simplification71.7%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ y x))))
(if (<= x -0.00075)
(* (/ y x) (/ t_0 (+ y x)))
(if (<= x -7.5e-208)
(* x (/ (/ y (+ y x)) (+ y x)))
(/ t_0 (+ y (+ x (+ x 1.0))))))))
double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (x <= -0.00075) {
tmp = (y / x) * (t_0 / (y + x));
} else if (x <= -7.5e-208) {
tmp = x * ((y / (y + x)) / (y + x));
} else {
tmp = t_0 / (y + (x + (x + 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 / (y + x)
if (x <= (-0.00075d0)) then
tmp = (y / x) * (t_0 / (y + x))
else if (x <= (-7.5d-208)) then
tmp = x * ((y / (y + x)) / (y + x))
else
tmp = t_0 / (y + (x + (x + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (x <= -0.00075) {
tmp = (y / x) * (t_0 / (y + x));
} else if (x <= -7.5e-208) {
tmp = x * ((y / (y + x)) / (y + x));
} else {
tmp = t_0 / (y + (x + (x + 1.0)));
}
return tmp;
}
def code(x, y): t_0 = x / (y + x) tmp = 0 if x <= -0.00075: tmp = (y / x) * (t_0 / (y + x)) elif x <= -7.5e-208: tmp = x * ((y / (y + x)) / (y + x)) else: tmp = t_0 / (y + (x + (x + 1.0))) return tmp
function code(x, y) t_0 = Float64(x / Float64(y + x)) tmp = 0.0 if (x <= -0.00075) tmp = Float64(Float64(y / x) * Float64(t_0 / Float64(y + x))); elseif (x <= -7.5e-208) tmp = Float64(x * Float64(Float64(y / Float64(y + x)) / Float64(y + x))); else tmp = Float64(t_0 / Float64(y + Float64(x + Float64(x + 1.0)))); end return tmp end
function tmp_2 = code(x, y) t_0 = x / (y + x); tmp = 0.0; if (x <= -0.00075) tmp = (y / x) * (t_0 / (y + x)); elseif (x <= -7.5e-208) tmp = x * ((y / (y + x)) / (y + x)); else tmp = t_0 / (y + (x + (x + 1.0))); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -0.00075], N[(N[(y / x), $MachinePrecision] * N[(t$95$0 / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -7.5e-208], N[(x * N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[(y + N[(x + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{y + x}\\
\mathbf{if}\;x \leq -0.00075:\\
\;\;\;\;\frac{y}{x} \cdot \frac{t_0}{y + x}\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{-208}:\\
\;\;\;\;x \cdot \frac{\frac{y}{y + x}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{y + \left(x + \left(x + 1\right)\right)}\\
\end{array}
\end{array}
if x < -7.5000000000000002e-4Initial program 61.6%
times-frac84.0%
associate-+l+84.0%
Simplified84.0%
Taylor expanded in x around inf 74.9%
associate-/r*81.8%
div-inv81.8%
Applied egg-rr81.8%
associate-*r/81.8%
*-rgt-identity81.8%
Simplified81.8%
if -7.5000000000000002e-4 < x < -7.4999999999999999e-208Initial program 82.4%
associate-/r*84.5%
+-commutative84.5%
+-commutative84.5%
+-commutative84.5%
associate-/l/82.4%
times-frac94.9%
*-commutative94.9%
+-commutative94.9%
+-commutative94.9%
+-commutative94.9%
associate-+l+94.9%
Simplified94.9%
associate-/r*99.7%
div-inv99.5%
Applied egg-rr99.5%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in y around 0 71.9%
+-commutative71.9%
Simplified71.9%
Taylor expanded in x around 0 71.1%
if -7.4999999999999999e-208 < x Initial program 67.0%
associate-/r*72.9%
+-commutative72.9%
+-commutative72.9%
+-commutative72.9%
associate-/r*67.0%
associate-*l/80.2%
*-commutative80.2%
*-commutative80.2%
distribute-rgt1-in72.5%
fma-def80.2%
+-commutative80.2%
+-commutative80.2%
cube-unmult80.2%
+-commutative80.2%
Simplified80.2%
associate-*r/66.9%
fma-udef60.9%
cube-mult60.9%
distribute-rgt1-in67.0%
associate-+r+67.0%
*-commutative67.0%
*-commutative67.0%
frac-times87.7%
associate-/r*99.8%
clear-num99.8%
frac-times99.6%
*-un-lft-identity99.6%
Applied egg-rr99.6%
Taylor expanded in y around -inf 59.7%
mul-1-neg59.7%
unsub-neg59.7%
neg-mul-159.7%
unsub-neg59.7%
distribute-lft-in59.7%
metadata-eval59.7%
neg-mul-159.7%
unsub-neg59.7%
Simplified59.7%
Final simplification67.1%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ y x))))
(if (<= x -0.00017)
(* (* t_0 (/ 1.0 (+ y x))) (/ y x))
(if (<= x -9.5e-210)
(* x (/ (/ y (+ y x)) (+ y x)))
(/ t_0 (+ y (+ x (+ x 1.0))))))))
double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (x <= -0.00017) {
tmp = (t_0 * (1.0 / (y + x))) * (y / x);
} else if (x <= -9.5e-210) {
tmp = x * ((y / (y + x)) / (y + x));
} else {
tmp = t_0 / (y + (x + (x + 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 / (y + x)
if (x <= (-0.00017d0)) then
tmp = (t_0 * (1.0d0 / (y + x))) * (y / x)
else if (x <= (-9.5d-210)) then
tmp = x * ((y / (y + x)) / (y + x))
else
tmp = t_0 / (y + (x + (x + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (x <= -0.00017) {
tmp = (t_0 * (1.0 / (y + x))) * (y / x);
} else if (x <= -9.5e-210) {
tmp = x * ((y / (y + x)) / (y + x));
} else {
tmp = t_0 / (y + (x + (x + 1.0)));
}
return tmp;
}
def code(x, y): t_0 = x / (y + x) tmp = 0 if x <= -0.00017: tmp = (t_0 * (1.0 / (y + x))) * (y / x) elif x <= -9.5e-210: tmp = x * ((y / (y + x)) / (y + x)) else: tmp = t_0 / (y + (x + (x + 1.0))) return tmp
function code(x, y) t_0 = Float64(x / Float64(y + x)) tmp = 0.0 if (x <= -0.00017) tmp = Float64(Float64(t_0 * Float64(1.0 / Float64(y + x))) * Float64(y / x)); elseif (x <= -9.5e-210) tmp = Float64(x * Float64(Float64(y / Float64(y + x)) / Float64(y + x))); else tmp = Float64(t_0 / Float64(y + Float64(x + Float64(x + 1.0)))); end return tmp end
function tmp_2 = code(x, y) t_0 = x / (y + x); tmp = 0.0; if (x <= -0.00017) tmp = (t_0 * (1.0 / (y + x))) * (y / x); elseif (x <= -9.5e-210) tmp = x * ((y / (y + x)) / (y + x)); else tmp = t_0 / (y + (x + (x + 1.0))); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -0.00017], N[(N[(t$95$0 * N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -9.5e-210], N[(x * N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[(y + N[(x + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{y + x}\\
\mathbf{if}\;x \leq -0.00017:\\
\;\;\;\;\left(t_0 \cdot \frac{1}{y + x}\right) \cdot \frac{y}{x}\\
\mathbf{elif}\;x \leq -9.5 \cdot 10^{-210}:\\
\;\;\;\;x \cdot \frac{\frac{y}{y + x}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{y + \left(x + \left(x + 1\right)\right)}\\
\end{array}
\end{array}
if x < -1.7e-4Initial program 61.6%
times-frac84.0%
associate-+l+84.0%
Simplified84.0%
Taylor expanded in x around inf 74.9%
associate-/r*81.8%
div-inv81.8%
Applied egg-rr81.8%
if -1.7e-4 < x < -9.4999999999999997e-210Initial program 82.4%
associate-/r*84.5%
+-commutative84.5%
+-commutative84.5%
+-commutative84.5%
associate-/l/82.4%
times-frac94.9%
*-commutative94.9%
+-commutative94.9%
+-commutative94.9%
+-commutative94.9%
associate-+l+94.9%
Simplified94.9%
associate-/r*99.7%
div-inv99.5%
Applied egg-rr99.5%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in y around 0 71.9%
+-commutative71.9%
Simplified71.9%
Taylor expanded in x around 0 71.1%
if -9.4999999999999997e-210 < x Initial program 67.0%
associate-/r*72.9%
+-commutative72.9%
+-commutative72.9%
+-commutative72.9%
associate-/r*67.0%
associate-*l/80.2%
*-commutative80.2%
*-commutative80.2%
distribute-rgt1-in72.5%
fma-def80.2%
+-commutative80.2%
+-commutative80.2%
cube-unmult80.2%
+-commutative80.2%
Simplified80.2%
associate-*r/66.9%
fma-udef60.9%
cube-mult60.9%
distribute-rgt1-in67.0%
associate-+r+67.0%
*-commutative67.0%
*-commutative67.0%
frac-times87.7%
associate-/r*99.8%
clear-num99.8%
frac-times99.6%
*-un-lft-identity99.6%
Applied egg-rr99.6%
Taylor expanded in y around -inf 59.7%
mul-1-neg59.7%
unsub-neg59.7%
neg-mul-159.7%
unsub-neg59.7%
distribute-lft-in59.7%
metadata-eval59.7%
neg-mul-159.7%
unsub-neg59.7%
Simplified59.7%
Final simplification67.1%
(FPCore (x y) :precision binary64 (if (<= x -980000.0) (* (* (/ x (+ y x)) (/ 1.0 (+ y x))) (/ y x)) (* (/ (/ y (+ y x)) (+ y x)) (/ x (+ y 1.0)))))
double code(double x, double y) {
double tmp;
if (x <= -980000.0) {
tmp = ((x / (y + x)) * (1.0 / (y + x))) * (y / x);
} else {
tmp = ((y / (y + x)) / (y + x)) * (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 (x <= (-980000.0d0)) then
tmp = ((x / (y + x)) * (1.0d0 / (y + x))) * (y / x)
else
tmp = ((y / (y + x)) / (y + x)) * (x / (y + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -980000.0) {
tmp = ((x / (y + x)) * (1.0 / (y + x))) * (y / x);
} else {
tmp = ((y / (y + x)) / (y + x)) * (x / (y + 1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -980000.0: tmp = ((x / (y + x)) * (1.0 / (y + x))) * (y / x) else: tmp = ((y / (y + x)) / (y + x)) * (x / (y + 1.0)) return tmp
function code(x, y) tmp = 0.0 if (x <= -980000.0) tmp = Float64(Float64(Float64(x / Float64(y + x)) * Float64(1.0 / Float64(y + x))) * Float64(y / x)); else tmp = Float64(Float64(Float64(y / Float64(y + x)) / Float64(y + x)) * Float64(x / Float64(y + 1.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -980000.0) tmp = ((x / (y + x)) * (1.0 / (y + x))) * (y / x); else tmp = ((y / (y + x)) / (y + x)) * (x / (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -980000.0], N[(N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -980000:\\
\;\;\;\;\left(\frac{x}{y + x} \cdot \frac{1}{y + x}\right) \cdot \frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{y + x}}{y + x} \cdot \frac{x}{y + 1}\\
\end{array}
\end{array}
if x < -9.8e5Initial program 61.0%
times-frac83.7%
associate-+l+83.7%
Simplified83.7%
Taylor expanded in x around inf 76.0%
associate-/r*83.0%
div-inv83.0%
Applied egg-rr83.0%
if -9.8e5 < x Initial program 70.6%
associate-/r*75.7%
+-commutative75.7%
+-commutative75.7%
+-commutative75.7%
associate-/l/70.6%
times-frac89.5%
*-commutative89.5%
+-commutative89.5%
+-commutative89.5%
+-commutative89.5%
associate-+l+89.5%
Simplified89.5%
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 89.6%
+-commutative80.6%
Simplified89.6%
Final simplification88.0%
(FPCore (x y) :precision binary64 (if (<= x -430000000.0) (* (* (/ x (+ y x)) (/ 1.0 (+ y x))) (/ y x)) (/ (/ (/ x (+ y 1.0)) (/ (+ y x) y)) (+ y x))))
double code(double x, double y) {
double tmp;
if (x <= -430000000.0) {
tmp = ((x / (y + x)) * (1.0 / (y + x))) * (y / x);
} else {
tmp = ((x / (y + 1.0)) / ((y + x) / y)) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-430000000.0d0)) then
tmp = ((x / (y + x)) * (1.0d0 / (y + x))) * (y / x)
else
tmp = ((x / (y + 1.0d0)) / ((y + x) / y)) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -430000000.0) {
tmp = ((x / (y + x)) * (1.0 / (y + x))) * (y / x);
} else {
tmp = ((x / (y + 1.0)) / ((y + x) / y)) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -430000000.0: tmp = ((x / (y + x)) * (1.0 / (y + x))) * (y / x) else: tmp = ((x / (y + 1.0)) / ((y + x) / y)) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (x <= -430000000.0) tmp = Float64(Float64(Float64(x / Float64(y + x)) * Float64(1.0 / Float64(y + x))) * Float64(y / x)); else tmp = Float64(Float64(Float64(x / Float64(y + 1.0)) / Float64(Float64(y + x) / y)) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -430000000.0) tmp = ((x / (y + x)) * (1.0 / (y + x))) * (y / x); else tmp = ((x / (y + 1.0)) / ((y + x) / y)) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -430000000.0], N[(N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -430000000:\\
\;\;\;\;\left(\frac{x}{y + x} \cdot \frac{1}{y + x}\right) \cdot \frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{x}{y + 1}}{\frac{y + x}{y}}}{y + x}\\
\end{array}
\end{array}
if x < -4.3e8Initial program 61.8%
times-frac83.5%
associate-+l+83.5%
Simplified83.5%
Taylor expanded in x around inf 77.2%
associate-/r*84.2%
div-inv84.2%
Applied egg-rr84.2%
if -4.3e8 < x Initial program 70.3%
associate-/r*75.8%
+-commutative75.8%
+-commutative75.8%
+-commutative75.8%
associate-/l/70.3%
times-frac89.5%
*-commutative89.5%
+-commutative89.5%
+-commutative89.5%
+-commutative89.5%
associate-+l+89.5%
Simplified89.5%
associate-/r*99.8%
div-inv99.7%
Applied egg-rr99.7%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
associate-*l/99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
*-commutative99.9%
clear-num99.8%
+-commutative99.8%
un-div-inv99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 83.1%
+-commutative80.7%
Simplified83.1%
Final simplification83.4%
(FPCore (x y) :precision binary64 (* (/ x (+ x (+ y 1.0))) (/ (/ y (+ y x)) (+ y x))))
double code(double x, double y) {
return (x / (x + (y + 1.0))) * ((y / (y + x)) / (y + x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x / (x + (y + 1.0d0))) * ((y / (y + x)) / (y + x))
end function
public static double code(double x, double y) {
return (x / (x + (y + 1.0))) * ((y / (y + x)) / (y + x));
}
def code(x, y): return (x / (x + (y + 1.0))) * ((y / (y + x)) / (y + x))
function code(x, y) return Float64(Float64(x / Float64(x + Float64(y + 1.0))) * Float64(Float64(y / Float64(y + x)) / Float64(y + x))) end
function tmp = code(x, y) tmp = (x / (x + (y + 1.0))) * ((y / (y + x)) / (y + x)); end
code[x_, y_] := N[(N[(x / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{x + \left(y + 1\right)} \cdot \frac{\frac{y}{y + x}}{y + x}
\end{array}
Initial program 68.2%
associate-/r*73.5%
+-commutative73.5%
+-commutative73.5%
+-commutative73.5%
associate-/l/68.2%
times-frac88.0%
*-commutative88.0%
+-commutative88.0%
+-commutative88.0%
+-commutative88.0%
associate-+l+88.0%
Simplified88.0%
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 y) x)) (t_1 (/ y (* x x))))
(if (<= y -1.9e-158)
t_1
(if (<= y 6.4e-204)
(/ y (+ y x))
(if (<= y 2.4e-195)
t_0
(if (<= y 6.8e-138) t_1 (if (<= y 0.75) t_0 (/ x (* y y)))))))))
double code(double x, double y) {
double t_0 = (x / y) - x;
double t_1 = y / (x * x);
double tmp;
if (y <= -1.9e-158) {
tmp = t_1;
} else if (y <= 6.4e-204) {
tmp = y / (y + x);
} else if (y <= 2.4e-195) {
tmp = t_0;
} else if (y <= 6.8e-138) {
tmp = t_1;
} else if (y <= 0.75) {
tmp = t_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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x / y) - x
t_1 = y / (x * x)
if (y <= (-1.9d-158)) then
tmp = t_1
else if (y <= 6.4d-204) then
tmp = y / (y + x)
else if (y <= 2.4d-195) then
tmp = t_0
else if (y <= 6.8d-138) then
tmp = t_1
else if (y <= 0.75d0) then
tmp = t_0
else
tmp = x / (y * y)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (x / y) - x;
double t_1 = y / (x * x);
double tmp;
if (y <= -1.9e-158) {
tmp = t_1;
} else if (y <= 6.4e-204) {
tmp = y / (y + x);
} else if (y <= 2.4e-195) {
tmp = t_0;
} else if (y <= 6.8e-138) {
tmp = t_1;
} else if (y <= 0.75) {
tmp = t_0;
} else {
tmp = x / (y * y);
}
return tmp;
}
def code(x, y): t_0 = (x / y) - x t_1 = y / (x * x) tmp = 0 if y <= -1.9e-158: tmp = t_1 elif y <= 6.4e-204: tmp = y / (y + x) elif y <= 2.4e-195: tmp = t_0 elif y <= 6.8e-138: tmp = t_1 elif y <= 0.75: tmp = t_0 else: tmp = x / (y * y) return tmp
function code(x, y) t_0 = Float64(Float64(x / y) - x) t_1 = Float64(y / Float64(x * x)) tmp = 0.0 if (y <= -1.9e-158) tmp = t_1; elseif (y <= 6.4e-204) tmp = Float64(y / Float64(y + x)); elseif (y <= 2.4e-195) tmp = t_0; elseif (y <= 6.8e-138) tmp = t_1; elseif (y <= 0.75) tmp = t_0; else tmp = Float64(x / Float64(y * y)); end return tmp end
function tmp_2 = code(x, y) t_0 = (x / y) - x; t_1 = y / (x * x); tmp = 0.0; if (y <= -1.9e-158) tmp = t_1; elseif (y <= 6.4e-204) tmp = y / (y + x); elseif (y <= 2.4e-195) tmp = t_0; elseif (y <= 6.8e-138) tmp = t_1; elseif (y <= 0.75) tmp = t_0; else tmp = x / (y * y); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$1 = N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.9e-158], t$95$1, If[LessEqual[y, 6.4e-204], N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e-195], t$95$0, If[LessEqual[y, 6.8e-138], t$95$1, If[LessEqual[y, 0.75], t$95$0, N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{y} - x\\
t_1 := \frac{y}{x \cdot x}\\
\mathbf{if}\;y \leq -1.9 \cdot 10^{-158}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{-204}:\\
\;\;\;\;\frac{y}{y + x}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-195}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{-138}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 0.75:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\end{array}
if y < -1.8999999999999999e-158 or 2.4e-195 < y < 6.8000000000000003e-138Initial program 69.0%
associate-/r*78.6%
+-commutative78.6%
+-commutative78.6%
+-commutative78.6%
associate-/r*69.0%
associate-*l/81.2%
*-commutative81.2%
*-commutative81.2%
distribute-rgt1-in53.4%
fma-def81.2%
+-commutative81.2%
+-commutative81.2%
cube-unmult81.2%
+-commutative81.2%
Simplified81.2%
Taylor expanded in x around inf 33.3%
unpow233.3%
Simplified33.3%
if -1.8999999999999999e-158 < y < 6.4e-204Initial program 68.3%
associate-/r*68.2%
+-commutative68.2%
+-commutative68.2%
+-commutative68.2%
associate-/l/68.3%
times-frac82.1%
*-commutative82.1%
+-commutative82.1%
+-commutative82.1%
+-commutative82.1%
associate-+l+82.1%
Simplified82.1%
associate-/r*99.8%
div-inv99.6%
Applied egg-rr99.6%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
associate-*l/99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 92.8%
Taylor expanded in x around 0 74.9%
if 6.4e-204 < y < 2.4e-195 or 6.8000000000000003e-138 < y < 0.75Initial program 77.8%
associate-/r*77.9%
+-commutative77.9%
+-commutative77.9%
+-commutative77.9%
associate-/l/77.8%
times-frac92.9%
*-commutative92.9%
+-commutative92.9%
+-commutative92.9%
+-commutative92.9%
associate-+l+92.9%
Simplified92.9%
associate-/r*99.8%
div-inv99.8%
Applied egg-rr99.8%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
Taylor expanded in x around 0 44.5%
associate-/r*44.5%
+-commutative44.5%
Simplified44.5%
Taylor expanded in y around 0 44.5%
neg-mul-144.5%
unsub-neg44.5%
Simplified44.5%
if 0.75 < y Initial program 63.0%
associate-/r*68.0%
+-commutative68.0%
+-commutative68.0%
+-commutative68.0%
associate-/r*63.0%
associate-*l/76.9%
*-commutative76.9%
*-commutative76.9%
distribute-rgt1-in71.1%
fma-def76.9%
+-commutative76.9%
+-commutative76.9%
cube-unmult76.9%
+-commutative76.9%
Simplified76.9%
Taylor expanded in y around inf 70.9%
unpow270.9%
Simplified70.9%
Final simplification53.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (- (/ x y) x)) (t_1 (/ y (* x x))))
(if (<= y -4.7e-163)
t_1
(if (<= y 6.4e-204)
(/ y (+ y x))
(if (<= y 1.3e-196)
t_0
(if (<= y 9e-139) t_1 (if (<= y 0.75) t_0 (/ (/ x y) y))))))))
double code(double x, double y) {
double t_0 = (x / y) - x;
double t_1 = y / (x * x);
double tmp;
if (y <= -4.7e-163) {
tmp = t_1;
} else if (y <= 6.4e-204) {
tmp = y / (y + x);
} else if (y <= 1.3e-196) {
tmp = t_0;
} else if (y <= 9e-139) {
tmp = t_1;
} else if (y <= 0.75) {
tmp = t_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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x / y) - x
t_1 = y / (x * x)
if (y <= (-4.7d-163)) then
tmp = t_1
else if (y <= 6.4d-204) then
tmp = y / (y + x)
else if (y <= 1.3d-196) then
tmp = t_0
else if (y <= 9d-139) then
tmp = t_1
else if (y <= 0.75d0) then
tmp = t_0
else
tmp = (x / y) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (x / y) - x;
double t_1 = y / (x * x);
double tmp;
if (y <= -4.7e-163) {
tmp = t_1;
} else if (y <= 6.4e-204) {
tmp = y / (y + x);
} else if (y <= 1.3e-196) {
tmp = t_0;
} else if (y <= 9e-139) {
tmp = t_1;
} else if (y <= 0.75) {
tmp = t_0;
} else {
tmp = (x / y) / y;
}
return tmp;
}
def code(x, y): t_0 = (x / y) - x t_1 = y / (x * x) tmp = 0 if y <= -4.7e-163: tmp = t_1 elif y <= 6.4e-204: tmp = y / (y + x) elif y <= 1.3e-196: tmp = t_0 elif y <= 9e-139: tmp = t_1 elif y <= 0.75: tmp = t_0 else: tmp = (x / y) / y return tmp
function code(x, y) t_0 = Float64(Float64(x / y) - x) t_1 = Float64(y / Float64(x * x)) tmp = 0.0 if (y <= -4.7e-163) tmp = t_1; elseif (y <= 6.4e-204) tmp = Float64(y / Float64(y + x)); elseif (y <= 1.3e-196) tmp = t_0; elseif (y <= 9e-139) tmp = t_1; elseif (y <= 0.75) tmp = t_0; else tmp = Float64(Float64(x / y) / y); end return tmp end
function tmp_2 = code(x, y) t_0 = (x / y) - x; t_1 = y / (x * x); tmp = 0.0; if (y <= -4.7e-163) tmp = t_1; elseif (y <= 6.4e-204) tmp = y / (y + x); elseif (y <= 1.3e-196) tmp = t_0; elseif (y <= 9e-139) tmp = t_1; elseif (y <= 0.75) tmp = t_0; else tmp = (x / y) / y; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$1 = N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.7e-163], t$95$1, If[LessEqual[y, 6.4e-204], N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e-196], t$95$0, If[LessEqual[y, 9e-139], t$95$1, If[LessEqual[y, 0.75], t$95$0, N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{y} - x\\
t_1 := \frac{y}{x \cdot x}\\
\mathbf{if}\;y \leq -4.7 \cdot 10^{-163}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{-204}:\\
\;\;\;\;\frac{y}{y + x}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-196}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 9 \cdot 10^{-139}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 0.75:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if y < -4.7e-163 or 1.2999999999999999e-196 < y < 9.00000000000000046e-139Initial program 69.3%
associate-/r*78.8%
+-commutative78.8%
+-commutative78.8%
+-commutative78.8%
associate-/r*69.3%
associate-*l/81.4%
*-commutative81.4%
*-commutative81.4%
distribute-rgt1-in53.9%
fma-def81.4%
+-commutative81.4%
+-commutative81.4%
cube-unmult81.4%
+-commutative81.4%
Simplified81.4%
Taylor expanded in x around inf 34.0%
unpow234.0%
Simplified34.0%
if -4.7e-163 < y < 6.4e-204Initial program 67.7%
associate-/r*67.7%
+-commutative67.7%
+-commutative67.7%
+-commutative67.7%
associate-/l/67.7%
times-frac81.8%
*-commutative81.8%
+-commutative81.8%
+-commutative81.8%
+-commutative81.8%
associate-+l+81.8%
Simplified81.8%
associate-/r*99.8%
div-inv99.6%
Applied egg-rr99.6%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
associate-*l/99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 92.7%
Taylor expanded in x around 0 76.2%
if 6.4e-204 < y < 1.2999999999999999e-196 or 9.00000000000000046e-139 < y < 0.75Initial program 77.8%
associate-/r*77.9%
+-commutative77.9%
+-commutative77.9%
+-commutative77.9%
associate-/l/77.8%
times-frac92.9%
*-commutative92.9%
+-commutative92.9%
+-commutative92.9%
+-commutative92.9%
associate-+l+92.9%
Simplified92.9%
associate-/r*99.8%
div-inv99.8%
Applied egg-rr99.8%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
Taylor expanded in x around 0 44.5%
associate-/r*44.5%
+-commutative44.5%
Simplified44.5%
Taylor expanded in y around 0 44.5%
neg-mul-144.5%
unsub-neg44.5%
Simplified44.5%
if 0.75 < y Initial program 63.0%
associate-/r*68.0%
+-commutative68.0%
+-commutative68.0%
+-commutative68.0%
associate-/r*63.0%
associate-*l/76.9%
*-commutative76.9%
*-commutative76.9%
distribute-rgt1-in71.1%
fma-def76.9%
+-commutative76.9%
+-commutative76.9%
cube-unmult76.9%
+-commutative76.9%
Simplified76.9%
Taylor expanded in y around inf 70.9%
unpow270.9%
Simplified70.9%
*-un-lft-identity70.9%
times-frac76.0%
Applied egg-rr76.0%
associate-*l/76.0%
*-lft-identity76.0%
Simplified76.0%
Final simplification55.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (- (/ x y) x)))
(if (<= y -1.6e-160)
(/ y (* x x))
(if (<= y 6.2e-204)
(/ y (+ y x))
(if (<= y 1.2e-196)
t_0
(if (<= y 6.4e-138)
(* y (/ 1.0 (* x x)))
(if (<= y 0.75) t_0 (/ (/ x y) y))))))))
double code(double x, double y) {
double t_0 = (x / y) - x;
double tmp;
if (y <= -1.6e-160) {
tmp = y / (x * x);
} else if (y <= 6.2e-204) {
tmp = y / (y + x);
} else if (y <= 1.2e-196) {
tmp = t_0;
} else if (y <= 6.4e-138) {
tmp = y * (1.0 / (x * x));
} else if (y <= 0.75) {
tmp = t_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) :: t_0
real(8) :: tmp
t_0 = (x / y) - x
if (y <= (-1.6d-160)) then
tmp = y / (x * x)
else if (y <= 6.2d-204) then
tmp = y / (y + x)
else if (y <= 1.2d-196) then
tmp = t_0
else if (y <= 6.4d-138) then
tmp = y * (1.0d0 / (x * x))
else if (y <= 0.75d0) then
tmp = t_0
else
tmp = (x / y) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (x / y) - x;
double tmp;
if (y <= -1.6e-160) {
tmp = y / (x * x);
} else if (y <= 6.2e-204) {
tmp = y / (y + x);
} else if (y <= 1.2e-196) {
tmp = t_0;
} else if (y <= 6.4e-138) {
tmp = y * (1.0 / (x * x));
} else if (y <= 0.75) {
tmp = t_0;
} else {
tmp = (x / y) / y;
}
return tmp;
}
def code(x, y): t_0 = (x / y) - x tmp = 0 if y <= -1.6e-160: tmp = y / (x * x) elif y <= 6.2e-204: tmp = y / (y + x) elif y <= 1.2e-196: tmp = t_0 elif y <= 6.4e-138: tmp = y * (1.0 / (x * x)) elif y <= 0.75: tmp = t_0 else: tmp = (x / y) / y return tmp
function code(x, y) t_0 = Float64(Float64(x / y) - x) tmp = 0.0 if (y <= -1.6e-160) tmp = Float64(y / Float64(x * x)); elseif (y <= 6.2e-204) tmp = Float64(y / Float64(y + x)); elseif (y <= 1.2e-196) tmp = t_0; elseif (y <= 6.4e-138) tmp = Float64(y * Float64(1.0 / Float64(x * x))); elseif (y <= 0.75) tmp = t_0; else tmp = Float64(Float64(x / y) / y); end return tmp end
function tmp_2 = code(x, y) t_0 = (x / y) - x; tmp = 0.0; if (y <= -1.6e-160) tmp = y / (x * x); elseif (y <= 6.2e-204) tmp = y / (y + x); elseif (y <= 1.2e-196) tmp = t_0; elseif (y <= 6.4e-138) tmp = y * (1.0 / (x * x)); elseif (y <= 0.75) tmp = t_0; else tmp = (x / y) / y; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision]}, If[LessEqual[y, -1.6e-160], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e-204], N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e-196], t$95$0, If[LessEqual[y, 6.4e-138], N[(y * N[(1.0 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.75], t$95$0, N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{y} - x\\
\mathbf{if}\;y \leq -1.6 \cdot 10^{-160}:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-204}:\\
\;\;\;\;\frac{y}{y + x}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-196}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{-138}:\\
\;\;\;\;y \cdot \frac{1}{x \cdot x}\\
\mathbf{elif}\;y \leq 0.75:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if y < -1.60000000000000004e-160Initial program 66.4%
associate-/r*77.2%
+-commutative77.2%
+-commutative77.2%
+-commutative77.2%
associate-/r*66.4%
associate-*l/79.0%
*-commutative79.0%
*-commutative79.0%
distribute-rgt1-in50.1%
fma-def79.0%
+-commutative79.0%
+-commutative79.0%
cube-unmult79.0%
+-commutative79.0%
Simplified79.0%
Taylor expanded in x around inf 27.6%
unpow227.6%
Simplified27.6%
if -1.60000000000000004e-160 < y < 6.1999999999999998e-204Initial program 68.3%
associate-/r*68.2%
+-commutative68.2%
+-commutative68.2%
+-commutative68.2%
associate-/l/68.3%
times-frac82.1%
*-commutative82.1%
+-commutative82.1%
+-commutative82.1%
+-commutative82.1%
associate-+l+82.1%
Simplified82.1%
associate-/r*99.8%
div-inv99.6%
Applied egg-rr99.6%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
associate-*l/99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 92.8%
Taylor expanded in x around 0 74.9%
if 6.1999999999999998e-204 < y < 1.2000000000000001e-196 or 6.40000000000000019e-138 < y < 0.75Initial program 77.8%
associate-/r*77.9%
+-commutative77.9%
+-commutative77.9%
+-commutative77.9%
associate-/l/77.8%
times-frac92.9%
*-commutative92.9%
+-commutative92.9%
+-commutative92.9%
+-commutative92.9%
associate-+l+92.9%
Simplified92.9%
associate-/r*99.8%
div-inv99.8%
Applied egg-rr99.8%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
Taylor expanded in x around 0 44.5%
associate-/r*44.5%
+-commutative44.5%
Simplified44.5%
Taylor expanded in y around 0 44.5%
neg-mul-144.5%
unsub-neg44.5%
Simplified44.5%
if 1.2000000000000001e-196 < y < 6.40000000000000019e-138Initial program 91.1%
associate-/r*91.0%
+-commutative91.0%
+-commutative91.0%
+-commutative91.0%
associate-/r*91.1%
associate-*l/99.9%
*-commutative99.9%
*-commutative99.9%
distribute-rgt1-in81.7%
fma-def99.9%
+-commutative99.9%
+-commutative99.9%
cube-unmult99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 82.7%
unpow282.7%
Simplified82.7%
if 0.75 < y Initial program 63.0%
associate-/r*68.0%
+-commutative68.0%
+-commutative68.0%
+-commutative68.0%
associate-/r*63.0%
associate-*l/76.9%
*-commutative76.9%
*-commutative76.9%
distribute-rgt1-in71.1%
fma-def76.9%
+-commutative76.9%
+-commutative76.9%
cube-unmult76.9%
+-commutative76.9%
Simplified76.9%
Taylor expanded in y around inf 70.9%
unpow270.9%
Simplified70.9%
*-un-lft-identity70.9%
times-frac76.0%
Applied egg-rr76.0%
associate-*l/76.0%
*-lft-identity76.0%
Simplified76.0%
Final simplification54.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (- (/ x y) x)) (t_1 (* (/ y x) (/ 1.0 x))))
(if (<= y -1.02e-162)
t_1
(if (<= y 6.4e-204)
(/ y (+ y x))
(if (<= y 2.2e-196)
t_0
(if (<= y 4.3e-138) t_1 (if (<= y 0.75) t_0 (/ (/ x y) y))))))))
double code(double x, double y) {
double t_0 = (x / y) - x;
double t_1 = (y / x) * (1.0 / x);
double tmp;
if (y <= -1.02e-162) {
tmp = t_1;
} else if (y <= 6.4e-204) {
tmp = y / (y + x);
} else if (y <= 2.2e-196) {
tmp = t_0;
} else if (y <= 4.3e-138) {
tmp = t_1;
} else if (y <= 0.75) {
tmp = t_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) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (x / y) - x
t_1 = (y / x) * (1.0d0 / x)
if (y <= (-1.02d-162)) then
tmp = t_1
else if (y <= 6.4d-204) then
tmp = y / (y + x)
else if (y <= 2.2d-196) then
tmp = t_0
else if (y <= 4.3d-138) then
tmp = t_1
else if (y <= 0.75d0) then
tmp = t_0
else
tmp = (x / y) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (x / y) - x;
double t_1 = (y / x) * (1.0 / x);
double tmp;
if (y <= -1.02e-162) {
tmp = t_1;
} else if (y <= 6.4e-204) {
tmp = y / (y + x);
} else if (y <= 2.2e-196) {
tmp = t_0;
} else if (y <= 4.3e-138) {
tmp = t_1;
} else if (y <= 0.75) {
tmp = t_0;
} else {
tmp = (x / y) / y;
}
return tmp;
}
def code(x, y): t_0 = (x / y) - x t_1 = (y / x) * (1.0 / x) tmp = 0 if y <= -1.02e-162: tmp = t_1 elif y <= 6.4e-204: tmp = y / (y + x) elif y <= 2.2e-196: tmp = t_0 elif y <= 4.3e-138: tmp = t_1 elif y <= 0.75: tmp = t_0 else: tmp = (x / y) / y return tmp
function code(x, y) t_0 = Float64(Float64(x / y) - x) t_1 = Float64(Float64(y / x) * Float64(1.0 / x)) tmp = 0.0 if (y <= -1.02e-162) tmp = t_1; elseif (y <= 6.4e-204) tmp = Float64(y / Float64(y + x)); elseif (y <= 2.2e-196) tmp = t_0; elseif (y <= 4.3e-138) tmp = t_1; elseif (y <= 0.75) tmp = t_0; else tmp = Float64(Float64(x / y) / y); end return tmp end
function tmp_2 = code(x, y) t_0 = (x / y) - x; t_1 = (y / x) * (1.0 / x); tmp = 0.0; if (y <= -1.02e-162) tmp = t_1; elseif (y <= 6.4e-204) tmp = y / (y + x); elseif (y <= 2.2e-196) tmp = t_0; elseif (y <= 4.3e-138) tmp = t_1; elseif (y <= 0.75) tmp = t_0; else tmp = (x / y) / y; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision]}, Block[{t$95$1 = N[(N[(y / x), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.02e-162], t$95$1, If[LessEqual[y, 6.4e-204], N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e-196], t$95$0, If[LessEqual[y, 4.3e-138], t$95$1, If[LessEqual[y, 0.75], t$95$0, N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{y} - x\\
t_1 := \frac{y}{x} \cdot \frac{1}{x}\\
\mathbf{if}\;y \leq -1.02 \cdot 10^{-162}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{-204}:\\
\;\;\;\;\frac{y}{y + x}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-196}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{-138}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 0.75:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if y < -1.01999999999999998e-162 or 2.20000000000000015e-196 < y < 4.3e-138Initial program 69.3%
times-frac92.3%
associate-+l+92.3%
Simplified92.3%
Taylor expanded in x around inf 42.8%
Taylor expanded in x around inf 34.7%
if -1.01999999999999998e-162 < y < 6.4e-204Initial program 67.7%
associate-/r*67.7%
+-commutative67.7%
+-commutative67.7%
+-commutative67.7%
associate-/l/67.7%
times-frac81.8%
*-commutative81.8%
+-commutative81.8%
+-commutative81.8%
+-commutative81.8%
associate-+l+81.8%
Simplified81.8%
associate-/r*99.8%
div-inv99.6%
Applied egg-rr99.6%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
associate-*l/99.9%
+-commutative99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 92.7%
Taylor expanded in x around 0 76.2%
if 6.4e-204 < y < 2.20000000000000015e-196 or 4.3e-138 < y < 0.75Initial program 77.8%
associate-/r*77.9%
+-commutative77.9%
+-commutative77.9%
+-commutative77.9%
associate-/l/77.8%
times-frac92.9%
*-commutative92.9%
+-commutative92.9%
+-commutative92.9%
+-commutative92.9%
associate-+l+92.9%
Simplified92.9%
associate-/r*99.8%
div-inv99.8%
Applied egg-rr99.8%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
Taylor expanded in x around 0 44.5%
associate-/r*44.5%
+-commutative44.5%
Simplified44.5%
Taylor expanded in y around 0 44.5%
neg-mul-144.5%
unsub-neg44.5%
Simplified44.5%
if 0.75 < y Initial program 63.0%
associate-/r*68.0%
+-commutative68.0%
+-commutative68.0%
+-commutative68.0%
associate-/r*63.0%
associate-*l/76.9%
*-commutative76.9%
*-commutative76.9%
distribute-rgt1-in71.1%
fma-def76.9%
+-commutative76.9%
+-commutative76.9%
cube-unmult76.9%
+-commutative76.9%
Simplified76.9%
Taylor expanded in y around inf 70.9%
unpow270.9%
Simplified70.9%
*-un-lft-identity70.9%
times-frac76.0%
Applied egg-rr76.0%
associate-*l/76.0%
*-lft-identity76.0%
Simplified76.0%
Final simplification55.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ y x))))
(if (<= x -4.8e-5)
(* (/ y x) (/ t_0 (+ y x)))
(if (<= x -3.9e-209) (* x (/ (/ y (+ y x)) (+ y x))) (/ t_0 (+ y 1.0))))))
double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (x <= -4.8e-5) {
tmp = (y / x) * (t_0 / (y + x));
} else if (x <= -3.9e-209) {
tmp = x * ((y / (y + x)) / (y + x));
} 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 / (y + x)
if (x <= (-4.8d-5)) then
tmp = (y / x) * (t_0 / (y + x))
else if (x <= (-3.9d-209)) then
tmp = x * ((y / (y + x)) / (y + x))
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 / (y + x);
double tmp;
if (x <= -4.8e-5) {
tmp = (y / x) * (t_0 / (y + x));
} else if (x <= -3.9e-209) {
tmp = x * ((y / (y + x)) / (y + x));
} else {
tmp = t_0 / (y + 1.0);
}
return tmp;
}
def code(x, y): t_0 = x / (y + x) tmp = 0 if x <= -4.8e-5: tmp = (y / x) * (t_0 / (y + x)) elif x <= -3.9e-209: tmp = x * ((y / (y + x)) / (y + x)) else: tmp = t_0 / (y + 1.0) return tmp
function code(x, y) t_0 = Float64(x / Float64(y + x)) tmp = 0.0 if (x <= -4.8e-5) tmp = Float64(Float64(y / x) * Float64(t_0 / Float64(y + x))); elseif (x <= -3.9e-209) tmp = Float64(x * Float64(Float64(y / Float64(y + x)) / Float64(y + x))); else tmp = Float64(t_0 / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) t_0 = x / (y + x); tmp = 0.0; if (x <= -4.8e-5) tmp = (y / x) * (t_0 / (y + x)); elseif (x <= -3.9e-209) tmp = x * ((y / (y + x)) / (y + x)); else tmp = t_0 / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.8e-5], N[(N[(y / x), $MachinePrecision] * N[(t$95$0 / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.9e-209], N[(x * N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{y + x}\\
\mathbf{if}\;x \leq -4.8 \cdot 10^{-5}:\\
\;\;\;\;\frac{y}{x} \cdot \frac{t_0}{y + x}\\
\mathbf{elif}\;x \leq -3.9 \cdot 10^{-209}:\\
\;\;\;\;x \cdot \frac{\frac{y}{y + x}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{y + 1}\\
\end{array}
\end{array}
if x < -4.8000000000000001e-5Initial program 61.6%
times-frac84.0%
associate-+l+84.0%
Simplified84.0%
Taylor expanded in x around inf 74.9%
associate-/r*81.8%
div-inv81.8%
Applied egg-rr81.8%
associate-*r/81.8%
*-rgt-identity81.8%
Simplified81.8%
if -4.8000000000000001e-5 < x < -3.9e-209Initial program 82.4%
associate-/r*84.5%
+-commutative84.5%
+-commutative84.5%
+-commutative84.5%
associate-/l/82.4%
times-frac94.9%
*-commutative94.9%
+-commutative94.9%
+-commutative94.9%
+-commutative94.9%
associate-+l+94.9%
Simplified94.9%
associate-/r*99.7%
div-inv99.5%
Applied egg-rr99.5%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Taylor expanded in y around 0 71.9%
+-commutative71.9%
Simplified71.9%
Taylor expanded in x around 0 71.1%
if -3.9e-209 < x Initial program 67.0%
associate-/r*72.9%
+-commutative72.9%
+-commutative72.9%
+-commutative72.9%
associate-/r*67.0%
associate-*l/80.2%
*-commutative80.2%
*-commutative80.2%
distribute-rgt1-in72.5%
fma-def80.2%
+-commutative80.2%
+-commutative80.2%
cube-unmult80.2%
+-commutative80.2%
Simplified80.2%
associate-*r/66.9%
fma-udef60.9%
cube-mult60.9%
distribute-rgt1-in67.0%
associate-+r+67.0%
*-commutative67.0%
*-commutative67.0%
frac-times87.7%
associate-/r*99.8%
clear-num99.8%
frac-times99.6%
*-un-lft-identity99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 58.9%
+-commutative58.9%
Simplified58.9%
Final simplification66.6%
(FPCore (x y)
:precision binary64
(if (<= x -1.0)
(/ y (* x x))
(if (<= x -5.2e-148)
(- (/ y x) y)
(if (or (<= x -2.6e-281) (not (<= x 3.2e-287)))
(/ x (* y y))
(- (/ x y) x)))))
double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = y / (x * x);
} else if (x <= -5.2e-148) {
tmp = (y / x) - y;
} else if ((x <= -2.6e-281) || !(x <= 3.2e-287)) {
tmp = x / (y * y);
} else {
tmp = (x / 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.0d0)) then
tmp = y / (x * x)
else if (x <= (-5.2d-148)) then
tmp = (y / x) - y
else if ((x <= (-2.6d-281)) .or. (.not. (x <= 3.2d-287))) then
tmp = x / (y * y)
else
tmp = (x / y) - x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = y / (x * x);
} else if (x <= -5.2e-148) {
tmp = (y / x) - y;
} else if ((x <= -2.6e-281) || !(x <= 3.2e-287)) {
tmp = x / (y * y);
} else {
tmp = (x / y) - x;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.0: tmp = y / (x * x) elif x <= -5.2e-148: tmp = (y / x) - y elif (x <= -2.6e-281) or not (x <= 3.2e-287): tmp = x / (y * y) else: tmp = (x / y) - x return tmp
function code(x, y) tmp = 0.0 if (x <= -1.0) tmp = Float64(y / Float64(x * x)); elseif (x <= -5.2e-148) tmp = Float64(Float64(y / x) - y); elseif ((x <= -2.6e-281) || !(x <= 3.2e-287)) tmp = Float64(x / Float64(y * y)); else tmp = Float64(Float64(x / y) - x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.0) tmp = y / (x * x); elseif (x <= -5.2e-148) tmp = (y / x) - y; elseif ((x <= -2.6e-281) || ~((x <= 3.2e-287))) tmp = x / (y * y); else tmp = (x / y) - x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.0], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.2e-148], N[(N[(y / x), $MachinePrecision] - y), $MachinePrecision], If[Or[LessEqual[x, -2.6e-281], N[Not[LessEqual[x, 3.2e-287]], $MachinePrecision]], N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;x \leq -5.2 \cdot 10^{-148}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{elif}\;x \leq -2.6 \cdot 10^{-281} \lor \neg \left(x \leq 3.2 \cdot 10^{-287}\right):\\
\;\;\;\;\frac{x}{y \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} - x\\
\end{array}
\end{array}
if x < -1Initial program 61.6%
associate-/r*67.3%
+-commutative67.3%
+-commutative67.3%
+-commutative67.3%
associate-/r*61.6%
associate-*l/78.2%
*-commutative78.2%
*-commutative78.2%
distribute-rgt1-in38.1%
fma-def78.2%
+-commutative78.2%
+-commutative78.2%
cube-unmult78.2%
+-commutative78.2%
Simplified78.2%
Taylor expanded in x around inf 63.7%
unpow263.7%
Simplified63.7%
if -1 < x < -5.20000000000000015e-148Initial program 83.7%
times-frac99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in y around 0 43.0%
Taylor expanded in x around 0 43.0%
neg-mul-143.0%
unsub-neg43.0%
Simplified43.0%
if -5.20000000000000015e-148 < x < -2.60000000000000005e-281 or 3.20000000000000018e-287 < x Initial program 69.0%
associate-/r*75.0%
+-commutative75.0%
+-commutative75.0%
+-commutative75.0%
associate-/r*69.0%
associate-*l/81.4%
*-commutative81.4%
*-commutative81.4%
distribute-rgt1-in74.3%
fma-def81.4%
+-commutative81.4%
+-commutative81.4%
cube-unmult81.3%
+-commutative81.3%
Simplified81.3%
Taylor expanded in y around inf 41.7%
unpow241.7%
Simplified41.7%
if -2.60000000000000005e-281 < x < 3.20000000000000018e-287Initial program 46.6%
associate-/r*46.6%
+-commutative46.6%
+-commutative46.6%
+-commutative46.6%
associate-/l/46.6%
times-frac61.1%
*-commutative61.1%
+-commutative61.1%
+-commutative61.1%
+-commutative61.1%
associate-+l+61.1%
Simplified61.1%
associate-/r*99.8%
div-inv99.8%
Applied egg-rr99.8%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
Taylor expanded in x around 0 93.6%
associate-/r*93.6%
+-commutative93.6%
Simplified93.6%
Taylor expanded in y around 0 58.2%
neg-mul-158.2%
unsub-neg58.2%
Simplified58.2%
Final simplification48.0%
(FPCore (x y)
:precision binary64
(if (<= x -1.0)
(* (/ y x) (/ 1.0 x))
(if (<= x -5.2e-148)
(- (/ y x) y)
(if (<= x 3e-77) (/ x (* y (+ y 1.0))) (/ (/ x y) y)))))
double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -5.2e-148) {
tmp = (y / x) - y;
} else if (x <= 3e-77) {
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 (x <= (-1.0d0)) then
tmp = (y / x) * (1.0d0 / x)
else if (x <= (-5.2d-148)) then
tmp = (y / x) - y
else if (x <= 3d-77) 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 (x <= -1.0) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -5.2e-148) {
tmp = (y / x) - y;
} else if (x <= 3e-77) {
tmp = x / (y * (y + 1.0));
} else {
tmp = (x / y) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.0: tmp = (y / x) * (1.0 / x) elif x <= -5.2e-148: tmp = (y / x) - y elif x <= 3e-77: tmp = x / (y * (y + 1.0)) else: tmp = (x / y) / y return tmp
function code(x, y) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(y / x) * Float64(1.0 / x)); elseif (x <= -5.2e-148) tmp = Float64(Float64(y / x) - y); elseif (x <= 3e-77) 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 (x <= -1.0) tmp = (y / x) * (1.0 / x); elseif (x <= -5.2e-148) tmp = (y / x) - y; elseif (x <= 3e-77) tmp = x / (y * (y + 1.0)); else tmp = (x / y) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.0], N[(N[(y / x), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.2e-148], N[(N[(y / x), $MachinePrecision] - y), $MachinePrecision], If[LessEqual[x, 3e-77], 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}\;x \leq -1:\\
\;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\
\mathbf{elif}\;x \leq -5.2 \cdot 10^{-148}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-77}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if x < -1Initial program 61.6%
times-frac84.0%
associate-+l+84.0%
Simplified84.0%
Taylor expanded in x around inf 74.9%
Taylor expanded in x around inf 70.6%
if -1 < x < -5.20000000000000015e-148Initial program 83.7%
times-frac99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in y around 0 43.0%
Taylor expanded in x around 0 43.0%
neg-mul-143.0%
unsub-neg43.0%
Simplified43.0%
if -5.20000000000000015e-148 < x < 3.00000000000000016e-77Initial program 70.9%
times-frac84.4%
associate-+l+84.4%
Simplified84.4%
Taylor expanded in x around 0 88.4%
+-commutative88.4%
Simplified88.4%
if 3.00000000000000016e-77 < x Initial program 64.5%
associate-/r*74.6%
+-commutative74.6%
+-commutative74.6%
+-commutative74.6%
associate-/r*64.5%
associate-*l/79.6%
*-commutative79.6%
*-commutative79.6%
distribute-rgt1-in73.0%
fma-def79.6%
+-commutative79.6%
+-commutative79.6%
cube-unmult79.5%
+-commutative79.5%
Simplified79.5%
Taylor expanded in y around inf 27.2%
unpow227.2%
Simplified27.2%
*-un-lft-identity27.2%
times-frac31.5%
Applied egg-rr31.5%
associate-*l/31.6%
*-lft-identity31.6%
Simplified31.6%
Final simplification59.7%
(FPCore (x y)
:precision binary64
(if (<= x -2.85e+169)
(* (/ y x) (/ 1.0 x))
(if (<= x -5.2e-148)
(/ y (* x (+ x 1.0)))
(if (<= x 3e-77) (/ x (* y (+ y 1.0))) (/ (/ x y) y)))))
double code(double x, double y) {
double tmp;
if (x <= -2.85e+169) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -5.2e-148) {
tmp = y / (x * (x + 1.0));
} else if (x <= 3e-77) {
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 (x <= (-2.85d+169)) then
tmp = (y / x) * (1.0d0 / x)
else if (x <= (-5.2d-148)) then
tmp = y / (x * (x + 1.0d0))
else if (x <= 3d-77) 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 (x <= -2.85e+169) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -5.2e-148) {
tmp = y / (x * (x + 1.0));
} else if (x <= 3e-77) {
tmp = x / (y * (y + 1.0));
} else {
tmp = (x / y) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -2.85e+169: tmp = (y / x) * (1.0 / x) elif x <= -5.2e-148: tmp = y / (x * (x + 1.0)) elif x <= 3e-77: tmp = x / (y * (y + 1.0)) else: tmp = (x / y) / y return tmp
function code(x, y) tmp = 0.0 if (x <= -2.85e+169) tmp = Float64(Float64(y / x) * Float64(1.0 / x)); elseif (x <= -5.2e-148) tmp = Float64(y / Float64(x * Float64(x + 1.0))); elseif (x <= 3e-77) 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 (x <= -2.85e+169) tmp = (y / x) * (1.0 / x); elseif (x <= -5.2e-148) tmp = y / (x * (x + 1.0)); elseif (x <= 3e-77) tmp = x / (y * (y + 1.0)); else tmp = (x / y) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -2.85e+169], N[(N[(y / x), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.2e-148], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3e-77], 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}\;x \leq -2.85 \cdot 10^{+169}:\\
\;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\
\mathbf{elif}\;x \leq -5.2 \cdot 10^{-148}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-77}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if x < -2.8500000000000001e169Initial program 52.3%
times-frac77.3%
associate-+l+77.3%
Simplified77.3%
Taylor expanded in x around inf 77.3%
Taylor expanded in x around inf 95.4%
if -2.8500000000000001e169 < x < -5.20000000000000015e-148Initial program 75.1%
times-frac93.5%
associate-+l+93.5%
Simplified93.5%
Taylor expanded in y around 0 49.8%
if -5.20000000000000015e-148 < x < 3.00000000000000016e-77Initial program 70.9%
times-frac84.4%
associate-+l+84.4%
Simplified84.4%
Taylor expanded in x around 0 88.4%
+-commutative88.4%
Simplified88.4%
if 3.00000000000000016e-77 < x Initial program 64.5%
associate-/r*74.6%
+-commutative74.6%
+-commutative74.6%
+-commutative74.6%
associate-/r*64.5%
associate-*l/79.6%
*-commutative79.6%
*-commutative79.6%
distribute-rgt1-in73.0%
fma-def79.6%
+-commutative79.6%
+-commutative79.6%
cube-unmult79.5%
+-commutative79.5%
Simplified79.5%
Taylor expanded in y around inf 27.2%
unpow227.2%
Simplified27.2%
*-un-lft-identity27.2%
times-frac31.5%
Applied egg-rr31.5%
associate-*l/31.6%
*-lft-identity31.6%
Simplified31.6%
Final simplification59.9%
(FPCore (x y) :precision binary64 (if (<= x -5.2e-148) (* (/ 1.0 x) (/ y (+ x (+ y 1.0)))) (/ (/ x (+ y x)) (+ y 1.0))))
double code(double x, double y) {
double tmp;
if (x <= -5.2e-148) {
tmp = (1.0 / x) * (y / (x + (y + 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 (x <= (-5.2d-148)) then
tmp = (1.0d0 / x) * (y / (x + (y + 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 (x <= -5.2e-148) {
tmp = (1.0 / x) * (y / (x + (y + 1.0)));
} else {
tmp = (x / (y + x)) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -5.2e-148: tmp = (1.0 / x) * (y / (x + (y + 1.0))) else: tmp = (x / (y + x)) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= -5.2e-148) tmp = Float64(Float64(1.0 / x) * Float64(y / Float64(x + Float64(y + 1.0)))); else tmp = Float64(Float64(x / Float64(y + x)) / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -5.2e-148) tmp = (1.0 / x) * (y / (x + (y + 1.0))); else tmp = (x / (y + x)) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -5.2e-148], N[(N[(1.0 / x), $MachinePrecision] * N[(y / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{-148}:\\
\;\;\;\;\frac{1}{x} \cdot \frac{y}{x + \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + x}}{y + 1}\\
\end{array}
\end{array}
if x < -5.20000000000000015e-148Initial program 69.3%
times-frac89.4%
associate-+l+89.4%
Simplified89.4%
Taylor expanded in x around inf 61.6%
if -5.20000000000000015e-148 < x Initial program 67.6%
associate-/r*73.2%
+-commutative73.2%
+-commutative73.2%
+-commutative73.2%
associate-/r*67.6%
associate-*l/80.1%
*-commutative80.1%
*-commutative80.1%
distribute-rgt1-in72.8%
fma-def80.1%
+-commutative80.1%
+-commutative80.1%
cube-unmult80.0%
+-commutative80.0%
Simplified80.0%
associate-*r/67.5%
fma-udef61.8%
cube-mult61.8%
distribute-rgt1-in67.6%
associate-+r+67.6%
*-commutative67.6%
*-commutative67.6%
frac-times87.2%
associate-/r*99.8%
clear-num99.8%
frac-times99.6%
*-un-lft-identity99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 60.0%
+-commutative60.0%
Simplified60.0%
Final simplification60.6%
(FPCore (x y) :precision binary64 (if (<= x -3.3e+169) (* (/ y x) (/ 1.0 x)) (if (<= x -5.2e-148) (/ y (* x (+ x 1.0))) (/ (/ x y) (+ y 1.0)))))
double code(double x, double y) {
double tmp;
if (x <= -3.3e+169) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -5.2e-148) {
tmp = y / (x * (x + 1.0));
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-3.3d+169)) then
tmp = (y / x) * (1.0d0 / x)
else if (x <= (-5.2d-148)) then
tmp = y / (x * (x + 1.0d0))
else
tmp = (x / y) / (y + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -3.3e+169) {
tmp = (y / x) * (1.0 / x);
} else if (x <= -5.2e-148) {
tmp = y / (x * (x + 1.0));
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -3.3e+169: tmp = (y / x) * (1.0 / x) elif x <= -5.2e-148: tmp = y / (x * (x + 1.0)) else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= -3.3e+169) tmp = Float64(Float64(y / x) * Float64(1.0 / x)); elseif (x <= -5.2e-148) tmp = Float64(y / Float64(x * Float64(x + 1.0))); else tmp = Float64(Float64(x / y) / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -3.3e+169) tmp = (y / x) * (1.0 / x); elseif (x <= -5.2e-148) tmp = y / (x * (x + 1.0)); else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -3.3e+169], N[(N[(y / x), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.2e-148], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.3 \cdot 10^{+169}:\\
\;\;\;\;\frac{y}{x} \cdot \frac{1}{x}\\
\mathbf{elif}\;x \leq -5.2 \cdot 10^{-148}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -3.2999999999999997e169Initial program 52.3%
times-frac77.3%
associate-+l+77.3%
Simplified77.3%
Taylor expanded in x around inf 77.3%
Taylor expanded in x around inf 95.4%
if -3.2999999999999997e169 < x < -5.20000000000000015e-148Initial program 75.1%
times-frac93.5%
associate-+l+93.5%
Simplified93.5%
Taylor expanded in y around 0 49.8%
if -5.20000000000000015e-148 < x Initial program 67.6%
associate-/r*73.2%
+-commutative73.2%
+-commutative73.2%
+-commutative73.2%
associate-/l/67.6%
times-frac87.3%
*-commutative87.3%
+-commutative87.3%
+-commutative87.3%
+-commutative87.3%
associate-+l+87.3%
Simplified87.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 57.4%
associate-/r*59.7%
+-commutative59.7%
Simplified59.7%
Final simplification60.4%
(FPCore (x y) :precision binary64 (if (<= x -4.2e+23) (/ (/ y x) (+ y x)) (if (<= x -5.2e-148) (/ y (* x (+ x 1.0))) (/ (/ x y) (+ y 1.0)))))
double code(double x, double y) {
double tmp;
if (x <= -4.2e+23) {
tmp = (y / x) / (y + x);
} else if (x <= -5.2e-148) {
tmp = y / (x * (x + 1.0));
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-4.2d+23)) then
tmp = (y / x) / (y + x)
else if (x <= (-5.2d-148)) then
tmp = y / (x * (x + 1.0d0))
else
tmp = (x / y) / (y + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -4.2e+23) {
tmp = (y / x) / (y + x);
} else if (x <= -5.2e-148) {
tmp = y / (x * (x + 1.0));
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -4.2e+23: tmp = (y / x) / (y + x) elif x <= -5.2e-148: tmp = y / (x * (x + 1.0)) else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= -4.2e+23) tmp = Float64(Float64(y / x) / Float64(y + x)); elseif (x <= -5.2e-148) tmp = Float64(y / Float64(x * Float64(x + 1.0))); else tmp = Float64(Float64(x / y) / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -4.2e+23) tmp = (y / x) / (y + x); elseif (x <= -5.2e-148) tmp = y / (x * (x + 1.0)); else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -4.2e+23], N[(N[(y / x), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.2e-148], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{+23}:\\
\;\;\;\;\frac{\frac{y}{x}}{y + x}\\
\mathbf{elif}\;x \leq -5.2 \cdot 10^{-148}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -4.2000000000000003e23Initial program 61.5%
associate-/r*64.6%
+-commutative64.6%
+-commutative64.6%
+-commutative64.6%
associate-/l/61.5%
times-frac82.5%
*-commutative82.5%
+-commutative82.5%
+-commutative82.5%
+-commutative82.5%
associate-+l+82.5%
Simplified82.5%
associate-/r*99.8%
div-inv99.7%
Applied egg-rr99.7%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
associate-*l/99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 73.9%
if -4.2000000000000003e23 < x < -5.20000000000000015e-148Initial program 81.1%
times-frac99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in y around 0 42.8%
if -5.20000000000000015e-148 < x Initial program 67.6%
associate-/r*73.2%
+-commutative73.2%
+-commutative73.2%
+-commutative73.2%
associate-/l/67.6%
times-frac87.3%
*-commutative87.3%
+-commutative87.3%
+-commutative87.3%
+-commutative87.3%
associate-+l+87.3%
Simplified87.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 57.4%
associate-/r*59.7%
+-commutative59.7%
Simplified59.7%
Final simplification60.4%
(FPCore (x y) :precision binary64 (if (<= x -5.2e-148) (/ 1.0 (/ x (/ y (+ x 1.0)))) (/ (/ x y) (+ y 1.0))))
double code(double x, double y) {
double tmp;
if (x <= -5.2e-148) {
tmp = 1.0 / (x / (y / (x + 1.0)));
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-5.2d-148)) then
tmp = 1.0d0 / (x / (y / (x + 1.0d0)))
else
tmp = (x / y) / (y + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -5.2e-148) {
tmp = 1.0 / (x / (y / (x + 1.0)));
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -5.2e-148: tmp = 1.0 / (x / (y / (x + 1.0))) else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= -5.2e-148) tmp = Float64(1.0 / Float64(x / Float64(y / Float64(x + 1.0)))); else tmp = Float64(Float64(x / y) / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -5.2e-148) tmp = 1.0 / (x / (y / (x + 1.0))); else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -5.2e-148], N[(1.0 / N[(x / N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{-148}:\\
\;\;\;\;\frac{1}{\frac{x}{\frac{y}{x + 1}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -5.20000000000000015e-148Initial program 69.3%
times-frac89.4%
associate-+l+89.4%
Simplified89.4%
Taylor expanded in y around 0 56.8%
clear-num56.8%
inv-pow56.8%
*-commutative56.8%
+-commutative56.8%
Applied egg-rr56.8%
unpow-156.8%
associate-/l*59.8%
+-commutative59.8%
Simplified59.8%
if -5.20000000000000015e-148 < x Initial program 67.6%
associate-/r*73.2%
+-commutative73.2%
+-commutative73.2%
+-commutative73.2%
associate-/l/67.6%
times-frac87.3%
*-commutative87.3%
+-commutative87.3%
+-commutative87.3%
+-commutative87.3%
associate-+l+87.3%
Simplified87.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 57.4%
associate-/r*59.7%
+-commutative59.7%
Simplified59.7%
Final simplification59.7%
(FPCore (x y) :precision binary64 (if (<= x -5.2e-148) (/ 1.0 (/ x (/ y (+ x 1.0)))) (/ (/ x (+ y x)) (+ y 1.0))))
double code(double x, double y) {
double tmp;
if (x <= -5.2e-148) {
tmp = 1.0 / (x / (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 (x <= (-5.2d-148)) then
tmp = 1.0d0 / (x / (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 (x <= -5.2e-148) {
tmp = 1.0 / (x / (y / (x + 1.0)));
} else {
tmp = (x / (y + x)) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -5.2e-148: tmp = 1.0 / (x / (y / (x + 1.0))) else: tmp = (x / (y + x)) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= -5.2e-148) tmp = Float64(1.0 / Float64(x / Float64(y / Float64(x + 1.0)))); else tmp = Float64(Float64(x / Float64(y + x)) / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -5.2e-148) tmp = 1.0 / (x / (y / (x + 1.0))); else tmp = (x / (y + x)) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -5.2e-148], N[(1.0 / N[(x / N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{-148}:\\
\;\;\;\;\frac{1}{\frac{x}{\frac{y}{x + 1}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + x}}{y + 1}\\
\end{array}
\end{array}
if x < -5.20000000000000015e-148Initial program 69.3%
times-frac89.4%
associate-+l+89.4%
Simplified89.4%
Taylor expanded in y around 0 56.8%
clear-num56.8%
inv-pow56.8%
*-commutative56.8%
+-commutative56.8%
Applied egg-rr56.8%
unpow-156.8%
associate-/l*59.8%
+-commutative59.8%
Simplified59.8%
if -5.20000000000000015e-148 < x Initial program 67.6%
associate-/r*73.2%
+-commutative73.2%
+-commutative73.2%
+-commutative73.2%
associate-/r*67.6%
associate-*l/80.1%
*-commutative80.1%
*-commutative80.1%
distribute-rgt1-in72.8%
fma-def80.1%
+-commutative80.1%
+-commutative80.1%
cube-unmult80.0%
+-commutative80.0%
Simplified80.0%
associate-*r/67.5%
fma-udef61.8%
cube-mult61.8%
distribute-rgt1-in67.6%
associate-+r+67.6%
*-commutative67.6%
*-commutative67.6%
frac-times87.2%
associate-/r*99.8%
clear-num99.8%
frac-times99.6%
*-un-lft-identity99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 60.0%
+-commutative60.0%
Simplified60.0%
Final simplification59.9%
(FPCore (x y) :precision binary64 (if (<= x -5.2e-148) (/ (/ y (+ x 1.0)) (+ y x)) (/ (/ x (+ y x)) (+ y 1.0))))
double code(double x, double y) {
double tmp;
if (x <= -5.2e-148) {
tmp = (y / (x + 1.0)) / (y + x);
} 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 (x <= (-5.2d-148)) then
tmp = (y / (x + 1.0d0)) / (y + x)
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 (x <= -5.2e-148) {
tmp = (y / (x + 1.0)) / (y + x);
} else {
tmp = (x / (y + x)) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -5.2e-148: tmp = (y / (x + 1.0)) / (y + x) else: tmp = (x / (y + x)) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= -5.2e-148) tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x)); else tmp = Float64(Float64(x / Float64(y + x)) / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -5.2e-148) tmp = (y / (x + 1.0)) / (y + x); else tmp = (x / (y + x)) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -5.2e-148], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{-148}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + x}}{y + 1}\\
\end{array}
\end{array}
if x < -5.20000000000000015e-148Initial program 69.3%
associate-/r*73.9%
+-commutative73.9%
+-commutative73.9%
+-commutative73.9%
associate-/l/69.3%
times-frac89.3%
*-commutative89.3%
+-commutative89.3%
+-commutative89.3%
+-commutative89.3%
associate-+l+89.3%
Simplified89.3%
associate-/r*99.8%
div-inv99.7%
Applied egg-rr99.7%
associate-*r/99.8%
*-rgt-identity99.8%
Simplified99.8%
associate-*l/99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 61.6%
if -5.20000000000000015e-148 < x Initial program 67.6%
associate-/r*73.2%
+-commutative73.2%
+-commutative73.2%
+-commutative73.2%
associate-/r*67.6%
associate-*l/80.1%
*-commutative80.1%
*-commutative80.1%
distribute-rgt1-in72.8%
fma-def80.1%
+-commutative80.1%
+-commutative80.1%
cube-unmult80.0%
+-commutative80.0%
Simplified80.0%
associate-*r/67.5%
fma-udef61.8%
cube-mult61.8%
distribute-rgt1-in67.6%
associate-+r+67.6%
*-commutative67.6%
*-commutative67.6%
frac-times87.2%
associate-/r*99.8%
clear-num99.8%
frac-times99.6%
*-un-lft-identity99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 60.0%
+-commutative60.0%
Simplified60.0%
Final simplification60.6%
(FPCore (x y) :precision binary64 (if (<= y 6.4e-204) (- (/ y x) y) (if (<= y 0.75) (- (/ x y) x) (/ x (* y y)))))
double code(double x, double y) {
double tmp;
if (y <= 6.4e-204) {
tmp = (y / x) - y;
} 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 <= 6.4d-204) then
tmp = (y / x) - y
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 <= 6.4e-204) {
tmp = (y / x) - y;
} else if (y <= 0.75) {
tmp = (x / y) - x;
} else {
tmp = x / (y * y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 6.4e-204: tmp = (y / x) - y elif y <= 0.75: tmp = (x / y) - x else: tmp = x / (y * y) return tmp
function code(x, y) tmp = 0.0 if (y <= 6.4e-204) tmp = Float64(Float64(y / x) - y); 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 <= 6.4e-204) tmp = (y / x) - y; elseif (y <= 0.75) tmp = (x / y) - x; else tmp = x / (y * y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 6.4e-204], N[(N[(y / x), $MachinePrecision] - y), $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 6.4 \cdot 10^{-204}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{elif}\;y \leq 0.75:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\end{array}
if y < 6.4e-204Initial program 67.1%
times-frac88.0%
associate-+l+88.0%
Simplified88.0%
Taylor expanded in y around 0 55.2%
Taylor expanded in x around 0 21.4%
neg-mul-121.4%
unsub-neg21.4%
Simplified21.4%
if 6.4e-204 < y < 0.75Initial program 81.6%
associate-/r*81.6%
+-commutative81.6%
+-commutative81.6%
+-commutative81.6%
associate-/l/81.6%
times-frac94.8%
*-commutative94.8%
+-commutative94.8%
+-commutative94.8%
+-commutative94.8%
associate-+l+94.8%
Simplified94.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 0 35.0%
associate-/r*35.0%
+-commutative35.0%
Simplified35.0%
Taylor expanded in y around 0 35.0%
neg-mul-135.0%
unsub-neg35.0%
Simplified35.0%
if 0.75 < y Initial program 63.0%
associate-/r*68.0%
+-commutative68.0%
+-commutative68.0%
+-commutative68.0%
associate-/r*63.0%
associate-*l/76.9%
*-commutative76.9%
*-commutative76.9%
distribute-rgt1-in71.1%
fma-def76.9%
+-commutative76.9%
+-commutative76.9%
cube-unmult76.9%
+-commutative76.9%
Simplified76.9%
Taylor expanded in y around inf 70.9%
unpow270.9%
Simplified70.9%
Final simplification36.6%
(FPCore (x y) :precision binary64 (if (<= x -6.7e-15) (/ 0.5 x) (- (/ x y) x)))
double code(double x, double y) {
double tmp;
if (x <= -6.7e-15) {
tmp = 0.5 / x;
} else {
tmp = (x / 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 <= (-6.7d-15)) then
tmp = 0.5d0 / x
else
tmp = (x / y) - x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -6.7e-15) {
tmp = 0.5 / x;
} else {
tmp = (x / y) - x;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -6.7e-15: tmp = 0.5 / x else: tmp = (x / y) - x return tmp
function code(x, y) tmp = 0.0 if (x <= -6.7e-15) tmp = Float64(0.5 / x); else tmp = Float64(Float64(x / y) - x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -6.7e-15) tmp = 0.5 / x; else tmp = (x / y) - x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -6.7e-15], N[(0.5 / x), $MachinePrecision], N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.7 \cdot 10^{-15}:\\
\;\;\;\;\frac{0.5}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} - x\\
\end{array}
\end{array}
if x < -6.70000000000000001e-15Initial program 62.2%
associate-/r*67.8%
+-commutative67.8%
+-commutative67.8%
+-commutative67.8%
associate-/r*62.2%
associate-*l/78.5%
*-commutative78.5%
*-commutative78.5%
distribute-rgt1-in39.0%
fma-def78.5%
+-commutative78.5%
+-commutative78.5%
cube-unmult78.6%
+-commutative78.6%
Simplified78.6%
associate-*r/62.2%
fma-udef35.8%
cube-mult35.8%
distribute-rgt1-in62.2%
associate-+r+62.2%
*-commutative62.2%
*-commutative62.2%
frac-times84.2%
associate-/r*99.7%
clear-num99.6%
frac-times96.8%
*-un-lft-identity96.8%
Applied egg-rr96.8%
Taylor expanded in y around -inf 30.8%
mul-1-neg30.8%
unsub-neg30.8%
neg-mul-130.8%
unsub-neg30.8%
distribute-lft-in30.8%
metadata-eval30.8%
neg-mul-130.8%
unsub-neg30.8%
Simplified30.8%
Taylor expanded in x around inf 5.6%
if -6.70000000000000001e-15 < x Initial program 70.3%
associate-/r*75.4%
+-commutative75.4%
+-commutative75.4%
+-commutative75.4%
associate-/l/70.3%
times-frac89.4%
*-commutative89.4%
+-commutative89.4%
+-commutative89.4%
+-commutative89.4%
associate-+l+89.4%
Simplified89.4%
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 58.3%
associate-/r*60.1%
+-commutative60.1%
Simplified60.1%
Taylor expanded in y around 0 17.8%
neg-mul-117.8%
unsub-neg17.8%
Simplified17.8%
Final simplification14.7%
(FPCore (x y) :precision binary64 (if (<= x -1.36e-207) (- (/ y x) y) (- (/ x y) x)))
double code(double x, double y) {
double tmp;
if (x <= -1.36e-207) {
tmp = (y / x) - y;
} else {
tmp = (x / 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.36d-207)) then
tmp = (y / x) - y
else
tmp = (x / y) - x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.36e-207) {
tmp = (y / x) - y;
} else {
tmp = (x / y) - x;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.36e-207: tmp = (y / x) - y else: tmp = (x / y) - x return tmp
function code(x, y) tmp = 0.0 if (x <= -1.36e-207) tmp = Float64(Float64(y / x) - y); else tmp = Float64(Float64(x / y) - x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.36e-207) tmp = (y / x) - y; else tmp = (x / y) - x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.36e-207], N[(N[(y / x), $MachinePrecision] - y), $MachinePrecision], N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.36 \cdot 10^{-207}:\\
\;\;\;\;\frac{y}{x} - y\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} - x\\
\end{array}
\end{array}
if x < -1.36e-207Initial program 70.0%
times-frac88.4%
associate-+l+88.4%
Simplified88.4%
Taylor expanded in y around 0 54.0%
Taylor expanded in x around 0 17.7%
neg-mul-117.7%
unsub-neg17.7%
Simplified17.7%
if -1.36e-207 < x Initial program 67.0%
associate-/r*72.9%
+-commutative72.9%
+-commutative72.9%
+-commutative72.9%
associate-/l/67.0%
times-frac87.8%
*-commutative87.8%
+-commutative87.8%
+-commutative87.8%
+-commutative87.8%
associate-+l+87.8%
Simplified87.8%
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 56.1%
associate-/r*58.5%
+-commutative58.5%
Simplified58.5%
Taylor expanded in y around 0 17.1%
neg-mul-117.1%
unsub-neg17.1%
Simplified17.1%
Final simplification17.4%
(FPCore (x y) :precision binary64 (/ 0.5 x))
double code(double x, double y) {
return 0.5 / x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 0.5d0 / x
end function
public static double code(double x, double y) {
return 0.5 / x;
}
def code(x, y): return 0.5 / x
function code(x, y) return Float64(0.5 / x) end
function tmp = code(x, y) tmp = 0.5 / x; end
code[x_, y_] := N[(0.5 / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.5}{x}
\end{array}
Initial program 68.2%
associate-/r*73.5%
+-commutative73.5%
+-commutative73.5%
+-commutative73.5%
associate-/r*68.2%
associate-*l/81.5%
*-commutative81.5%
*-commutative81.5%
distribute-rgt1-in65.1%
fma-def81.5%
+-commutative81.5%
+-commutative81.5%
cube-unmult81.5%
+-commutative81.5%
Simplified81.5%
associate-*r/68.2%
fma-udef56.0%
cube-mult56.0%
distribute-rgt1-in68.2%
associate-+r+68.2%
*-commutative68.2%
*-commutative68.2%
frac-times88.0%
associate-/r*99.8%
clear-num99.7%
frac-times98.9%
*-un-lft-identity98.9%
Applied egg-rr98.9%
Taylor expanded in y around -inf 53.4%
mul-1-neg53.4%
unsub-neg53.4%
neg-mul-153.4%
unsub-neg53.4%
distribute-lft-in53.4%
metadata-eval53.4%
neg-mul-153.4%
unsub-neg53.4%
Simplified53.4%
Taylor expanded in x around inf 4.0%
Final simplification4.0%
(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 2023274
(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))))