
(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 23 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)) (/ (/ y (+ y (+ x 1.0))) (+ x y))))
double code(double x, double y) {
return (x / (x + y)) * ((y / (y + (x + 1.0))) / (x + y));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x / (x + y)) * ((y / (y + (x + 1.0d0))) / (x + y))
end function
public static double code(double x, double y) {
return (x / (x + y)) * ((y / (y + (x + 1.0))) / (x + y));
}
def code(x, y): return (x / (x + y)) * ((y / (y + (x + 1.0))) / (x + y))
function code(x, y) return Float64(Float64(x / Float64(x + y)) * Float64(Float64(y / Float64(y + Float64(x + 1.0))) / Float64(x + y))) end
function tmp = code(x, y) tmp = (x / (x + y)) * ((y / (y + (x + 1.0))) / (x + y)); end
code[x_, y_] := N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(N[(y / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{x + y} \cdot \frac{\frac{y}{y + \left(x + 1\right)}}{x + y}
\end{array}
Initial program 71.5%
times-frac88.9%
associate-+r+88.9%
associate-*l/82.4%
times-frac99.8%
+-commutative99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ y (+ x 1.0))))
(if (<= y 1.38e-179)
(/ (/ y x) (+ x (+ y 1.0)))
(if (<= y 0.00025)
(* y (/ x (* (+ x y) (* (+ x y) t_0))))
(* (/ (/ y t_0) (+ x y)) (/ x y))))))
double code(double x, double y) {
double t_0 = y + (x + 1.0);
double tmp;
if (y <= 1.38e-179) {
tmp = (y / x) / (x + (y + 1.0));
} else if (y <= 0.00025) {
tmp = y * (x / ((x + y) * ((x + y) * t_0)));
} else {
tmp = ((y / t_0) / (x + y)) * (x / 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 = y + (x + 1.0d0)
if (y <= 1.38d-179) then
tmp = (y / x) / (x + (y + 1.0d0))
else if (y <= 0.00025d0) then
tmp = y * (x / ((x + y) * ((x + y) * t_0)))
else
tmp = ((y / t_0) / (x + y)) * (x / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y + (x + 1.0);
double tmp;
if (y <= 1.38e-179) {
tmp = (y / x) / (x + (y + 1.0));
} else if (y <= 0.00025) {
tmp = y * (x / ((x + y) * ((x + y) * t_0)));
} else {
tmp = ((y / t_0) / (x + y)) * (x / y);
}
return tmp;
}
def code(x, y): t_0 = y + (x + 1.0) tmp = 0 if y <= 1.38e-179: tmp = (y / x) / (x + (y + 1.0)) elif y <= 0.00025: tmp = y * (x / ((x + y) * ((x + y) * t_0))) else: tmp = ((y / t_0) / (x + y)) * (x / y) return tmp
function code(x, y) t_0 = Float64(y + Float64(x + 1.0)) tmp = 0.0 if (y <= 1.38e-179) tmp = Float64(Float64(y / x) / Float64(x + Float64(y + 1.0))); elseif (y <= 0.00025) tmp = Float64(y * Float64(x / Float64(Float64(x + y) * Float64(Float64(x + y) * t_0)))); else tmp = Float64(Float64(Float64(y / t_0) / Float64(x + y)) * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y) t_0 = y + (x + 1.0); tmp = 0.0; if (y <= 1.38e-179) tmp = (y / x) / (x + (y + 1.0)); elseif (y <= 0.00025) tmp = y * (x / ((x + y) * ((x + y) * t_0))); else tmp = ((y / t_0) / (x + y)) * (x / y); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 1.38e-179], N[(N[(y / x), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.00025], N[(y * N[(x / N[(N[(x + y), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y / t$95$0), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y + \left(x + 1\right)\\
\mathbf{if}\;y \leq 1.38 \cdot 10^{-179}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + \left(y + 1\right)}\\
\mathbf{elif}\;y \leq 0.00025:\\
\;\;\;\;y \cdot \frac{x}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot t_0\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{t_0}}{x + y} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if y < 1.3800000000000001e-179Initial program 73.8%
times-frac90.1%
/-rgt-identity90.1%
associate-/l/90.1%
*-lft-identity90.1%
associate-+l+90.1%
Simplified90.1%
Taylor expanded in x around inf 63.4%
expm1-log1p-u62.8%
expm1-udef41.1%
frac-times41.1%
*-un-lft-identity41.1%
Applied egg-rr41.1%
expm1-def62.7%
expm1-log1p63.3%
associate-/r*63.4%
Simplified63.4%
if 1.3800000000000001e-179 < y < 2.5000000000000001e-4Initial program 89.2%
*-commutative89.2%
associate-*r/96.8%
*-commutative96.8%
distribute-rgt1-in79.7%
fma-def96.8%
cube-unmult96.9%
Simplified96.9%
fma-udef79.8%
cube-mult79.7%
distribute-rgt1-in96.8%
associate-+r+96.8%
associate-*r*96.8%
+-commutative96.8%
associate-+l+96.8%
+-commutative96.8%
+-commutative96.8%
Applied egg-rr96.8%
if 2.5000000000000001e-4 < y Initial program 55.4%
times-frac79.6%
associate-+r+79.6%
associate-*l/79.6%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 85.3%
Final simplification74.4%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ x (+ y 1.0))))
(if (<= y 1.38e-179)
(/ (/ y x) t_0)
(if (<= y 1.6e+149)
(* (/ x (* (+ x y) (+ x y))) (/ y t_0))
(/ (/ x (+ x y)) (+ (+ y 1.0) (* x 2.0)))))))
double code(double x, double y) {
double t_0 = x + (y + 1.0);
double tmp;
if (y <= 1.38e-179) {
tmp = (y / x) / t_0;
} else if (y <= 1.6e+149) {
tmp = (x / ((x + y) * (x + y))) * (y / t_0);
} else {
tmp = (x / (x + y)) / ((y + 1.0) + (x * 2.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.38d-179) then
tmp = (y / x) / t_0
else if (y <= 1.6d+149) then
tmp = (x / ((x + y) * (x + y))) * (y / t_0)
else
tmp = (x / (x + y)) / ((y + 1.0d0) + (x * 2.0d0))
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.38e-179) {
tmp = (y / x) / t_0;
} else if (y <= 1.6e+149) {
tmp = (x / ((x + y) * (x + y))) * (y / t_0);
} else {
tmp = (x / (x + y)) / ((y + 1.0) + (x * 2.0));
}
return tmp;
}
def code(x, y): t_0 = x + (y + 1.0) tmp = 0 if y <= 1.38e-179: tmp = (y / x) / t_0 elif y <= 1.6e+149: tmp = (x / ((x + y) * (x + y))) * (y / t_0) else: tmp = (x / (x + y)) / ((y + 1.0) + (x * 2.0)) return tmp
function code(x, y) t_0 = Float64(x + Float64(y + 1.0)) tmp = 0.0 if (y <= 1.38e-179) tmp = Float64(Float64(y / x) / t_0); elseif (y <= 1.6e+149) tmp = Float64(Float64(x / Float64(Float64(x + y) * Float64(x + y))) * Float64(y / t_0)); else tmp = Float64(Float64(x / Float64(x + y)) / Float64(Float64(y + 1.0) + Float64(x * 2.0))); end return tmp end
function tmp_2 = code(x, y) t_0 = x + (y + 1.0); tmp = 0.0; if (y <= 1.38e-179) tmp = (y / x) / t_0; elseif (y <= 1.6e+149) tmp = (x / ((x + y) * (x + y))) * (y / t_0); else tmp = (x / (x + y)) / ((y + 1.0) + (x * 2.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.38e-179], N[(N[(y / x), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[y, 1.6e+149], N[(N[(x / N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(N[(y + 1.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \left(y + 1\right)\\
\mathbf{if}\;y \leq 1.38 \cdot 10^{-179}:\\
\;\;\;\;\frac{\frac{y}{x}}{t_0}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+149}:\\
\;\;\;\;\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{x + y}}{\left(y + 1\right) + x \cdot 2}\\
\end{array}
\end{array}
if y < 1.3800000000000001e-179Initial program 73.8%
times-frac90.1%
/-rgt-identity90.1%
associate-/l/90.1%
*-lft-identity90.1%
associate-+l+90.1%
Simplified90.1%
Taylor expanded in x around inf 63.4%
expm1-log1p-u62.8%
expm1-udef41.1%
frac-times41.1%
*-un-lft-identity41.1%
Applied egg-rr41.1%
expm1-def62.7%
expm1-log1p63.3%
associate-/r*63.4%
Simplified63.4%
if 1.3800000000000001e-179 < y < 1.6000000000000001e149Initial program 77.7%
times-frac98.0%
/-rgt-identity98.0%
associate-/l/98.0%
*-lft-identity98.0%
associate-+l+98.0%
Simplified98.0%
if 1.6000000000000001e149 < y Initial program 52.1%
times-frac68.5%
associate-+r+68.5%
associate-*l/68.5%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
Applied egg-rr99.7%
clear-num99.7%
associate-+r+99.7%
+-commutative99.7%
inv-pow99.8%
Applied egg-rr99.8%
unpow-199.7%
Simplified99.7%
associate-*r/99.8%
+-commutative99.8%
clear-num99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
associate-/l*99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in y around inf 91.3%
Final simplification76.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ x y))))
(if (<= y 4.5e-124)
(/ (/ y x) (+ x (+ y 1.0)))
(if (<= y 1.3e-68)
(- (/ x y) x)
(if (<= y 4e-54)
(/ y (* x (+ x 1.0)))
(if (<= y 5e-8)
(/ t_0 (+ y 1.0))
(if (<= y 1.6e+149) (/ x (* (+ x y) (+ x y))) (/ t_0 y))))))))
double code(double x, double y) {
double t_0 = x / (x + y);
double tmp;
if (y <= 4.5e-124) {
tmp = (y / x) / (x + (y + 1.0));
} else if (y <= 1.3e-68) {
tmp = (x / y) - x;
} else if (y <= 4e-54) {
tmp = y / (x * (x + 1.0));
} else if (y <= 5e-8) {
tmp = t_0 / (y + 1.0);
} else if (y <= 1.6e+149) {
tmp = x / ((x + y) * (x + y));
} else {
tmp = t_0 / y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = x / (x + y)
if (y <= 4.5d-124) then
tmp = (y / x) / (x + (y + 1.0d0))
else if (y <= 1.3d-68) then
tmp = (x / y) - x
else if (y <= 4d-54) then
tmp = y / (x * (x + 1.0d0))
else if (y <= 5d-8) then
tmp = t_0 / (y + 1.0d0)
else if (y <= 1.6d+149) then
tmp = x / ((x + y) * (x + y))
else
tmp = t_0 / y
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (x + y);
double tmp;
if (y <= 4.5e-124) {
tmp = (y / x) / (x + (y + 1.0));
} else if (y <= 1.3e-68) {
tmp = (x / y) - x;
} else if (y <= 4e-54) {
tmp = y / (x * (x + 1.0));
} else if (y <= 5e-8) {
tmp = t_0 / (y + 1.0);
} else if (y <= 1.6e+149) {
tmp = x / ((x + y) * (x + y));
} else {
tmp = t_0 / y;
}
return tmp;
}
def code(x, y): t_0 = x / (x + y) tmp = 0 if y <= 4.5e-124: tmp = (y / x) / (x + (y + 1.0)) elif y <= 1.3e-68: tmp = (x / y) - x elif y <= 4e-54: tmp = y / (x * (x + 1.0)) elif y <= 5e-8: tmp = t_0 / (y + 1.0) elif y <= 1.6e+149: tmp = x / ((x + y) * (x + y)) else: tmp = t_0 / y return tmp
function code(x, y) t_0 = Float64(x / Float64(x + y)) tmp = 0.0 if (y <= 4.5e-124) tmp = Float64(Float64(y / x) / Float64(x + Float64(y + 1.0))); elseif (y <= 1.3e-68) tmp = Float64(Float64(x / y) - x); elseif (y <= 4e-54) tmp = Float64(y / Float64(x * Float64(x + 1.0))); elseif (y <= 5e-8) tmp = Float64(t_0 / Float64(y + 1.0)); elseif (y <= 1.6e+149) tmp = Float64(x / Float64(Float64(x + y) * Float64(x + y))); else tmp = Float64(t_0 / y); end return tmp end
function tmp_2 = code(x, y) t_0 = x / (x + y); tmp = 0.0; if (y <= 4.5e-124) tmp = (y / x) / (x + (y + 1.0)); elseif (y <= 1.3e-68) tmp = (x / y) - x; elseif (y <= 4e-54) tmp = y / (x * (x + 1.0)); elseif (y <= 5e-8) tmp = t_0 / (y + 1.0); elseif (y <= 1.6e+149) tmp = x / ((x + y) * (x + y)); else tmp = t_0 / y; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 4.5e-124], N[(N[(y / x), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e-68], N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[y, 4e-54], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e-8], N[(t$95$0 / N[(y + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e+149], N[(x / N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{x + y}\\
\mathbf{if}\;y \leq 4.5 \cdot 10^{-124}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + \left(y + 1\right)}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-68}:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-54}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{elif}\;y \leq 5 \cdot 10^{-8}:\\
\;\;\;\;\frac{t_0}{y + 1}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+149}:\\
\;\;\;\;\frac{x}{\left(x + y\right) \cdot \left(x + y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{y}\\
\end{array}
\end{array}
if y < 4.4999999999999996e-124Initial program 75.5%
times-frac90.7%
/-rgt-identity90.7%
associate-/l/90.7%
*-lft-identity90.7%
associate-+l+90.7%
Simplified90.7%
Taylor expanded in x around inf 65.7%
expm1-log1p-u65.1%
expm1-udef40.7%
frac-times40.7%
*-un-lft-identity40.7%
Applied egg-rr40.7%
expm1-def65.0%
expm1-log1p65.5%
associate-/r*65.7%
Simplified65.7%
if 4.4999999999999996e-124 < y < 1.2999999999999999e-68Initial program 47.3%
times-frac99.5%
/-rgt-identity99.5%
associate-/l/99.5%
*-lft-identity99.5%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in x around 0 83.6%
distribute-rgt-in83.6%
*-lft-identity83.6%
Simplified83.6%
Taylor expanded in y around 0 83.6%
neg-mul-183.6%
unsub-neg83.6%
Simplified83.6%
if 1.2999999999999999e-68 < y < 4.0000000000000001e-54Initial program 99.7%
times-frac99.6%
/-rgt-identity99.6%
associate-/l/99.6%
*-lft-identity99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in y around 0 85.2%
if 4.0000000000000001e-54 < y < 4.9999999999999998e-8Initial program 93.0%
times-frac99.6%
/-rgt-identity99.6%
associate-/l/99.6%
*-lft-identity99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in x around 0 82.9%
+-commutative82.9%
Simplified82.9%
*-commutative82.9%
clear-num82.7%
associate-/r*61.0%
+-commutative61.0%
+-commutative61.0%
frac-times61.1%
*-un-lft-identity61.1%
+-commutative61.1%
+-commutative61.1%
Applied egg-rr61.1%
Taylor expanded in x around 0 48.9%
+-commutative48.9%
Simplified48.9%
if 4.9999999999999998e-8 < y < 1.6000000000000001e149Initial program 62.8%
times-frac95.8%
/-rgt-identity95.8%
associate-/l/95.8%
*-lft-identity95.8%
associate-+l+95.8%
Simplified95.8%
Taylor expanded in y around inf 75.0%
if 1.6000000000000001e149 < y Initial program 52.1%
times-frac68.5%
/-rgt-identity68.5%
associate-/l/68.5%
*-lft-identity68.5%
associate-+l+68.5%
Simplified68.5%
Taylor expanded in x around 0 68.5%
+-commutative68.5%
Simplified68.5%
*-commutative68.5%
clear-num68.5%
associate-/r*90.0%
+-commutative90.0%
+-commutative90.0%
frac-times90.0%
*-un-lft-identity90.0%
+-commutative90.0%
+-commutative90.0%
Applied egg-rr90.0%
Taylor expanded in y around inf 89.9%
Final simplification70.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (* (+ x y) (+ x y)))))
(if (<= y 1.8e-126)
(/ (/ y x) (+ x (+ y 1.0)))
(if (<= y 0.00025)
(* y t_0)
(if (<= y 1.6e+149) t_0 (/ (/ x (+ x y)) (+ (+ y 1.0) (* x 2.0))))))))
double code(double x, double y) {
double t_0 = x / ((x + y) * (x + y));
double tmp;
if (y <= 1.8e-126) {
tmp = (y / x) / (x + (y + 1.0));
} else if (y <= 0.00025) {
tmp = y * t_0;
} else if (y <= 1.6e+149) {
tmp = t_0;
} else {
tmp = (x / (x + y)) / ((y + 1.0) + (x * 2.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = x / ((x + y) * (x + y))
if (y <= 1.8d-126) then
tmp = (y / x) / (x + (y + 1.0d0))
else if (y <= 0.00025d0) then
tmp = y * t_0
else if (y <= 1.6d+149) then
tmp = t_0
else
tmp = (x / (x + y)) / ((y + 1.0d0) + (x * 2.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / ((x + y) * (x + y));
double tmp;
if (y <= 1.8e-126) {
tmp = (y / x) / (x + (y + 1.0));
} else if (y <= 0.00025) {
tmp = y * t_0;
} else if (y <= 1.6e+149) {
tmp = t_0;
} else {
tmp = (x / (x + y)) / ((y + 1.0) + (x * 2.0));
}
return tmp;
}
def code(x, y): t_0 = x / ((x + y) * (x + y)) tmp = 0 if y <= 1.8e-126: tmp = (y / x) / (x + (y + 1.0)) elif y <= 0.00025: tmp = y * t_0 elif y <= 1.6e+149: tmp = t_0 else: tmp = (x / (x + y)) / ((y + 1.0) + (x * 2.0)) return tmp
function code(x, y) t_0 = Float64(x / Float64(Float64(x + y) * Float64(x + y))) tmp = 0.0 if (y <= 1.8e-126) tmp = Float64(Float64(y / x) / Float64(x + Float64(y + 1.0))); elseif (y <= 0.00025) tmp = Float64(y * t_0); elseif (y <= 1.6e+149) tmp = t_0; else tmp = Float64(Float64(x / Float64(x + y)) / Float64(Float64(y + 1.0) + Float64(x * 2.0))); end return tmp end
function tmp_2 = code(x, y) t_0 = x / ((x + y) * (x + y)); tmp = 0.0; if (y <= 1.8e-126) tmp = (y / x) / (x + (y + 1.0)); elseif (y <= 0.00025) tmp = y * t_0; elseif (y <= 1.6e+149) tmp = t_0; else tmp = (x / (x + y)) / ((y + 1.0) + (x * 2.0)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 1.8e-126], N[(N[(y / x), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.00025], N[(y * t$95$0), $MachinePrecision], If[LessEqual[y, 1.6e+149], t$95$0, N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(N[(y + 1.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\left(x + y\right) \cdot \left(x + y\right)}\\
\mathbf{if}\;y \leq 1.8 \cdot 10^{-126}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + \left(y + 1\right)}\\
\mathbf{elif}\;y \leq 0.00025:\\
\;\;\;\;y \cdot t_0\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+149}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{x + y}}{\left(y + 1\right) + x \cdot 2}\\
\end{array}
\end{array}
if y < 1.8e-126Initial program 75.5%
times-frac90.7%
/-rgt-identity90.7%
associate-/l/90.7%
*-lft-identity90.7%
associate-+l+90.7%
Simplified90.7%
Taylor expanded in x around inf 65.7%
expm1-log1p-u65.1%
expm1-udef40.7%
frac-times40.7%
*-un-lft-identity40.7%
Applied egg-rr40.7%
expm1-def65.0%
expm1-log1p65.5%
associate-/r*65.7%
Simplified65.7%
if 1.8e-126 < y < 2.5000000000000001e-4Initial program 85.9%
times-frac99.6%
/-rgt-identity99.6%
associate-/l/99.6%
*-lft-identity99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in x around 0 90.4%
+-commutative90.4%
Simplified90.4%
Taylor expanded in y around 0 87.2%
if 2.5000000000000001e-4 < y < 1.6000000000000001e149Initial program 60.2%
times-frac95.6%
/-rgt-identity95.6%
associate-/l/95.6%
*-lft-identity95.6%
associate-+l+95.6%
Simplified95.6%
Taylor expanded in y around inf 76.4%
if 1.6000000000000001e149 < y Initial program 52.1%
times-frac68.5%
associate-+r+68.5%
associate-*l/68.5%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
Applied egg-rr99.7%
clear-num99.7%
associate-+r+99.7%
+-commutative99.7%
inv-pow99.8%
Applied egg-rr99.8%
unpow-199.7%
Simplified99.7%
associate-*r/99.8%
+-commutative99.8%
clear-num99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
associate-/l*99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in y around inf 91.3%
Final simplification73.3%
(FPCore (x y)
:precision binary64
(if (<= y 4.2e-125)
(/ (/ y x) (+ x (+ y 1.0)))
(if (<= y 4.9e-26)
(* y (/ x (* (+ x y) (+ x y))))
(* (/ (/ y (+ y (+ x 1.0))) (+ x y)) (/ x y)))))
double code(double x, double y) {
double tmp;
if (y <= 4.2e-125) {
tmp = (y / x) / (x + (y + 1.0));
} else if (y <= 4.9e-26) {
tmp = y * (x / ((x + y) * (x + y)));
} else {
tmp = ((y / (y + (x + 1.0))) / (x + y)) * (x / y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 4.2d-125) then
tmp = (y / x) / (x + (y + 1.0d0))
else if (y <= 4.9d-26) then
tmp = y * (x / ((x + y) * (x + y)))
else
tmp = ((y / (y + (x + 1.0d0))) / (x + y)) * (x / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 4.2e-125) {
tmp = (y / x) / (x + (y + 1.0));
} else if (y <= 4.9e-26) {
tmp = y * (x / ((x + y) * (x + y)));
} else {
tmp = ((y / (y + (x + 1.0))) / (x + y)) * (x / y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 4.2e-125: tmp = (y / x) / (x + (y + 1.0)) elif y <= 4.9e-26: tmp = y * (x / ((x + y) * (x + y))) else: tmp = ((y / (y + (x + 1.0))) / (x + y)) * (x / y) return tmp
function code(x, y) tmp = 0.0 if (y <= 4.2e-125) tmp = Float64(Float64(y / x) / Float64(x + Float64(y + 1.0))); elseif (y <= 4.9e-26) tmp = Float64(y * Float64(x / Float64(Float64(x + y) * Float64(x + y)))); else tmp = Float64(Float64(Float64(y / Float64(y + Float64(x + 1.0))) / Float64(x + y)) * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 4.2e-125) tmp = (y / x) / (x + (y + 1.0)); elseif (y <= 4.9e-26) tmp = y * (x / ((x + y) * (x + y))); else tmp = ((y / (y + (x + 1.0))) / (x + y)) * (x / y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 4.2e-125], N[(N[(y / x), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.9e-26], N[(y * N[(x / N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.2 \cdot 10^{-125}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + \left(y + 1\right)}\\
\mathbf{elif}\;y \leq 4.9 \cdot 10^{-26}:\\
\;\;\;\;y \cdot \frac{x}{\left(x + y\right) \cdot \left(x + y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{y + \left(x + 1\right)}}{x + y} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if y < 4.2e-125Initial program 75.5%
times-frac90.7%
/-rgt-identity90.7%
associate-/l/90.7%
*-lft-identity90.7%
associate-+l+90.7%
Simplified90.7%
Taylor expanded in x around inf 65.7%
expm1-log1p-u65.1%
expm1-udef40.7%
frac-times40.7%
*-un-lft-identity40.7%
Applied egg-rr40.7%
expm1-def65.0%
expm1-log1p65.5%
associate-/r*65.7%
Simplified65.7%
if 4.2e-125 < y < 4.8999999999999999e-26Initial program 85.7%
times-frac99.6%
/-rgt-identity99.6%
associate-/l/99.6%
*-lft-identity99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in x around 0 91.7%
+-commutative91.7%
Simplified91.7%
Taylor expanded in y around 0 91.7%
if 4.8999999999999999e-26 < y Initial program 58.4%
times-frac81.5%
associate-+r+81.5%
associate-*l/81.5%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 85.4%
Final simplification73.8%
(FPCore (x y)
:precision binary64
(if (<= y 9.5e-127)
(/ (/ y x) (+ x (+ y 1.0)))
(if (<= y 1.6e+149)
(* (/ x (* (+ x y) (+ x y))) (/ y (+ y 1.0)))
(/ (/ x (+ x y)) (+ (+ y 1.0) (* x 2.0))))))
double code(double x, double y) {
double tmp;
if (y <= 9.5e-127) {
tmp = (y / x) / (x + (y + 1.0));
} else if (y <= 1.6e+149) {
tmp = (x / ((x + y) * (x + y))) * (y / (y + 1.0));
} else {
tmp = (x / (x + y)) / ((y + 1.0) + (x * 2.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 9.5d-127) then
tmp = (y / x) / (x + (y + 1.0d0))
else if (y <= 1.6d+149) then
tmp = (x / ((x + y) * (x + y))) * (y / (y + 1.0d0))
else
tmp = (x / (x + y)) / ((y + 1.0d0) + (x * 2.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 9.5e-127) {
tmp = (y / x) / (x + (y + 1.0));
} else if (y <= 1.6e+149) {
tmp = (x / ((x + y) * (x + y))) * (y / (y + 1.0));
} else {
tmp = (x / (x + y)) / ((y + 1.0) + (x * 2.0));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 9.5e-127: tmp = (y / x) / (x + (y + 1.0)) elif y <= 1.6e+149: tmp = (x / ((x + y) * (x + y))) * (y / (y + 1.0)) else: tmp = (x / (x + y)) / ((y + 1.0) + (x * 2.0)) return tmp
function code(x, y) tmp = 0.0 if (y <= 9.5e-127) tmp = Float64(Float64(y / x) / Float64(x + Float64(y + 1.0))); elseif (y <= 1.6e+149) tmp = Float64(Float64(x / Float64(Float64(x + y) * Float64(x + y))) * Float64(y / Float64(y + 1.0))); else tmp = Float64(Float64(x / Float64(x + y)) / Float64(Float64(y + 1.0) + Float64(x * 2.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 9.5e-127) tmp = (y / x) / (x + (y + 1.0)); elseif (y <= 1.6e+149) tmp = (x / ((x + y) * (x + y))) * (y / (y + 1.0)); else tmp = (x / (x + y)) / ((y + 1.0) + (x * 2.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 9.5e-127], N[(N[(y / x), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e+149], N[(N[(x / N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(N[(y + 1.0), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 9.5 \cdot 10^{-127}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + \left(y + 1\right)}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+149}:\\
\;\;\;\;\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{y + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{x + y}}{\left(y + 1\right) + x \cdot 2}\\
\end{array}
\end{array}
if y < 9.4999999999999997e-127Initial program 75.5%
times-frac90.7%
/-rgt-identity90.7%
associate-/l/90.7%
*-lft-identity90.7%
associate-+l+90.7%
Simplified90.7%
Taylor expanded in x around inf 65.7%
expm1-log1p-u65.1%
expm1-udef40.7%
frac-times40.7%
*-un-lft-identity40.7%
Applied egg-rr40.7%
expm1-def65.0%
expm1-log1p65.5%
associate-/r*65.7%
Simplified65.7%
if 9.4999999999999997e-127 < y < 1.6000000000000001e149Initial program 73.9%
times-frac97.7%
/-rgt-identity97.7%
associate-/l/97.7%
*-lft-identity97.7%
associate-+l+97.7%
Simplified97.7%
Taylor expanded in x around 0 84.7%
+-commutative84.7%
Simplified84.7%
if 1.6000000000000001e149 < y Initial program 52.1%
times-frac68.5%
associate-+r+68.5%
associate-*l/68.5%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
Applied egg-rr99.7%
clear-num99.7%
associate-+r+99.7%
+-commutative99.7%
inv-pow99.8%
Applied egg-rr99.8%
unpow-199.7%
Simplified99.7%
associate-*r/99.8%
+-commutative99.8%
clear-num99.8%
+-commutative99.8%
+-commutative99.8%
Applied egg-rr99.8%
associate-/l*99.7%
+-commutative99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in y around inf 91.3%
Final simplification73.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (- (/ x y) x)) (t_1 (/ y (* x x))))
(if (<= y -7.4e-110)
t_1
(if (<= y 2.2e-203)
(* y (/ 1.0 x))
(if (<= y 4.5e-124)
t_1
(if (<= y 2.85e-68)
t_0
(if (<= y 2.6e-54) 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 <= -7.4e-110) {
tmp = t_1;
} else if (y <= 2.2e-203) {
tmp = y * (1.0 / x);
} else if (y <= 4.5e-124) {
tmp = t_1;
} else if (y <= 2.85e-68) {
tmp = t_0;
} else if (y <= 2.6e-54) {
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 <= (-7.4d-110)) then
tmp = t_1
else if (y <= 2.2d-203) then
tmp = y * (1.0d0 / x)
else if (y <= 4.5d-124) then
tmp = t_1
else if (y <= 2.85d-68) then
tmp = t_0
else if (y <= 2.6d-54) 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 <= -7.4e-110) {
tmp = t_1;
} else if (y <= 2.2e-203) {
tmp = y * (1.0 / x);
} else if (y <= 4.5e-124) {
tmp = t_1;
} else if (y <= 2.85e-68) {
tmp = t_0;
} else if (y <= 2.6e-54) {
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 <= -7.4e-110: tmp = t_1 elif y <= 2.2e-203: tmp = y * (1.0 / x) elif y <= 4.5e-124: tmp = t_1 elif y <= 2.85e-68: tmp = t_0 elif y <= 2.6e-54: 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 <= -7.4e-110) tmp = t_1; elseif (y <= 2.2e-203) tmp = Float64(y * Float64(1.0 / x)); elseif (y <= 4.5e-124) tmp = t_1; elseif (y <= 2.85e-68) tmp = t_0; elseif (y <= 2.6e-54) 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 <= -7.4e-110) tmp = t_1; elseif (y <= 2.2e-203) tmp = y * (1.0 / x); elseif (y <= 4.5e-124) tmp = t_1; elseif (y <= 2.85e-68) tmp = t_0; elseif (y <= 2.6e-54) 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, -7.4e-110], t$95$1, If[LessEqual[y, 2.2e-203], N[(y * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e-124], t$95$1, If[LessEqual[y, 2.85e-68], t$95$0, If[LessEqual[y, 2.6e-54], 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 -7.4 \cdot 10^{-110}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-203}:\\
\;\;\;\;y \cdot \frac{1}{x}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-124}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.85 \cdot 10^{-68}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-54}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 0.75:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\end{array}
if y < -7.40000000000000032e-110 or 2.2e-203 < y < 4.4999999999999996e-124 or 2.8500000000000001e-68 < y < 2.60000000000000002e-54Initial program 81.3%
associate-*r/86.3%
*-commutative86.3%
distribute-rgt1-in52.2%
fma-def86.3%
cube-unmult86.4%
Simplified86.4%
Taylor expanded in x around inf 40.5%
unpow240.5%
Simplified40.5%
if -7.40000000000000032e-110 < y < 2.2e-203Initial program 68.9%
times-frac84.2%
/-rgt-identity84.2%
associate-/l/84.2%
*-lft-identity84.2%
associate-+l+84.2%
Simplified84.2%
Taylor expanded in x around 0 73.3%
+-commutative73.3%
Simplified73.3%
Taylor expanded in y around 0 73.3%
Taylor expanded in x around inf 81.3%
if 4.4999999999999996e-124 < y < 2.8500000000000001e-68 or 2.60000000000000002e-54 < y < 0.75Initial program 82.6%
times-frac99.6%
/-rgt-identity99.6%
associate-/l/99.6%
*-lft-identity99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in x around 0 56.7%
distribute-rgt-in56.8%
*-lft-identity56.8%
Simplified56.8%
Taylor expanded in y around 0 55.2%
neg-mul-155.2%
unsub-neg55.2%
Simplified55.2%
if 0.75 < y Initial program 55.4%
associate-*r/71.0%
*-commutative71.0%
distribute-rgt1-in66.6%
fma-def70.9%
cube-unmult71.0%
Simplified71.0%
Taylor expanded in y around inf 63.0%
unpow263.0%
Simplified63.0%
Final simplification58.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (- (/ x y) x)) (t_1 (/ y (* x x))))
(if (<= y -4.4e-105)
t_1
(if (<= y 4.1e-203)
(/ (- y) (- x))
(if (<= y 4.2e-124)
t_1
(if (<= y 2.95e-68)
t_0
(if (<= y 2.45e-54) 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.4e-105) {
tmp = t_1;
} else if (y <= 4.1e-203) {
tmp = -y / -x;
} else if (y <= 4.2e-124) {
tmp = t_1;
} else if (y <= 2.95e-68) {
tmp = t_0;
} else if (y <= 2.45e-54) {
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.4d-105)) then
tmp = t_1
else if (y <= 4.1d-203) then
tmp = -y / -x
else if (y <= 4.2d-124) then
tmp = t_1
else if (y <= 2.95d-68) then
tmp = t_0
else if (y <= 2.45d-54) 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.4e-105) {
tmp = t_1;
} else if (y <= 4.1e-203) {
tmp = -y / -x;
} else if (y <= 4.2e-124) {
tmp = t_1;
} else if (y <= 2.95e-68) {
tmp = t_0;
} else if (y <= 2.45e-54) {
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.4e-105: tmp = t_1 elif y <= 4.1e-203: tmp = -y / -x elif y <= 4.2e-124: tmp = t_1 elif y <= 2.95e-68: tmp = t_0 elif y <= 2.45e-54: 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.4e-105) tmp = t_1; elseif (y <= 4.1e-203) tmp = Float64(Float64(-y) / Float64(-x)); elseif (y <= 4.2e-124) tmp = t_1; elseif (y <= 2.95e-68) tmp = t_0; elseif (y <= 2.45e-54) 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 <= -4.4e-105) tmp = t_1; elseif (y <= 4.1e-203) tmp = -y / -x; elseif (y <= 4.2e-124) tmp = t_1; elseif (y <= 2.95e-68) tmp = t_0; elseif (y <= 2.45e-54) 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.4e-105], t$95$1, If[LessEqual[y, 4.1e-203], N[((-y) / (-x)), $MachinePrecision], If[LessEqual[y, 4.2e-124], t$95$1, If[LessEqual[y, 2.95e-68], t$95$0, If[LessEqual[y, 2.45e-54], 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 -4.4 \cdot 10^{-105}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{-203}:\\
\;\;\;\;\frac{-y}{-x}\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{-124}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.95 \cdot 10^{-68}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 2.45 \cdot 10^{-54}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 0.75:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\end{array}
if y < -4.40000000000000008e-105 or 4.09999999999999981e-203 < y < 4.2000000000000002e-124 or 2.95e-68 < y < 2.4500000000000001e-54Initial program 81.1%
associate-*r/86.2%
*-commutative86.2%
distribute-rgt1-in51.7%
fma-def86.2%
cube-unmult86.2%
Simplified86.2%
Taylor expanded in x around inf 39.8%
unpow239.8%
Simplified39.8%
if -4.40000000000000008e-105 < y < 4.09999999999999981e-203Initial program 69.3%
times-frac84.4%
/-rgt-identity84.4%
associate-/l/84.4%
*-lft-identity84.4%
associate-+l+84.4%
Simplified84.4%
Taylor expanded in x around 0 72.2%
+-commutative72.2%
Simplified72.2%
Taylor expanded in y around 0 72.2%
Taylor expanded in x around inf 80.2%
associate-*l/80.3%
*-un-lft-identity80.3%
frac-2neg80.3%
Applied egg-rr80.3%
if 4.2000000000000002e-124 < y < 2.95e-68 or 2.4500000000000001e-54 < y < 0.75Initial program 82.6%
times-frac99.6%
/-rgt-identity99.6%
associate-/l/99.6%
*-lft-identity99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in x around 0 56.7%
distribute-rgt-in56.8%
*-lft-identity56.8%
Simplified56.8%
Taylor expanded in y around 0 55.2%
neg-mul-155.2%
unsub-neg55.2%
Simplified55.2%
if 0.75 < y Initial program 55.4%
associate-*r/71.0%
*-commutative71.0%
distribute-rgt1-in66.6%
fma-def70.9%
cube-unmult71.0%
Simplified71.0%
Taylor expanded in y around inf 63.0%
unpow263.0%
Simplified63.0%
Final simplification57.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (- (/ x y) x)) (t_1 (/ y (* x x))))
(if (<= y -3.9e-101)
t_1
(if (<= y 1.85e-205)
(/ (- y) (- x))
(if (<= y 4.5e-124)
t_1
(if (<= y 1.45e-68)
t_0
(if (<= y 3.4e-54) 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 <= -3.9e-101) {
tmp = t_1;
} else if (y <= 1.85e-205) {
tmp = -y / -x;
} else if (y <= 4.5e-124) {
tmp = t_1;
} else if (y <= 1.45e-68) {
tmp = t_0;
} else if (y <= 3.4e-54) {
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 <= (-3.9d-101)) then
tmp = t_1
else if (y <= 1.85d-205) then
tmp = -y / -x
else if (y <= 4.5d-124) then
tmp = t_1
else if (y <= 1.45d-68) then
tmp = t_0
else if (y <= 3.4d-54) 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 <= -3.9e-101) {
tmp = t_1;
} else if (y <= 1.85e-205) {
tmp = -y / -x;
} else if (y <= 4.5e-124) {
tmp = t_1;
} else if (y <= 1.45e-68) {
tmp = t_0;
} else if (y <= 3.4e-54) {
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 <= -3.9e-101: tmp = t_1 elif y <= 1.85e-205: tmp = -y / -x elif y <= 4.5e-124: tmp = t_1 elif y <= 1.45e-68: tmp = t_0 elif y <= 3.4e-54: 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 <= -3.9e-101) tmp = t_1; elseif (y <= 1.85e-205) tmp = Float64(Float64(-y) / Float64(-x)); elseif (y <= 4.5e-124) tmp = t_1; elseif (y <= 1.45e-68) tmp = t_0; elseif (y <= 3.4e-54) 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 <= -3.9e-101) tmp = t_1; elseif (y <= 1.85e-205) tmp = -y / -x; elseif (y <= 4.5e-124) tmp = t_1; elseif (y <= 1.45e-68) tmp = t_0; elseif (y <= 3.4e-54) 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, -3.9e-101], t$95$1, If[LessEqual[y, 1.85e-205], N[((-y) / (-x)), $MachinePrecision], If[LessEqual[y, 4.5e-124], t$95$1, If[LessEqual[y, 1.45e-68], t$95$0, If[LessEqual[y, 3.4e-54], 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 -3.9 \cdot 10^{-101}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{-205}:\\
\;\;\;\;\frac{-y}{-x}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-124}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{-68}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-54}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 0.75:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if y < -3.90000000000000015e-101 or 1.85e-205 < y < 4.4999999999999996e-124 or 1.45e-68 < y < 3.39999999999999987e-54Initial program 81.1%
associate-*r/86.2%
*-commutative86.2%
distribute-rgt1-in51.7%
fma-def86.2%
cube-unmult86.2%
Simplified86.2%
Taylor expanded in x around inf 39.8%
unpow239.8%
Simplified39.8%
if -3.90000000000000015e-101 < y < 1.85e-205Initial program 69.3%
times-frac84.4%
/-rgt-identity84.4%
associate-/l/84.4%
*-lft-identity84.4%
associate-+l+84.4%
Simplified84.4%
Taylor expanded in x around 0 72.2%
+-commutative72.2%
Simplified72.2%
Taylor expanded in y around 0 72.2%
Taylor expanded in x around inf 80.2%
associate-*l/80.3%
*-un-lft-identity80.3%
frac-2neg80.3%
Applied egg-rr80.3%
if 4.4999999999999996e-124 < y < 1.45e-68 or 3.39999999999999987e-54 < y < 0.75Initial program 82.6%
times-frac99.6%
/-rgt-identity99.6%
associate-/l/99.6%
*-lft-identity99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in x around 0 56.7%
distribute-rgt-in56.8%
*-lft-identity56.8%
Simplified56.8%
Taylor expanded in y around 0 55.2%
neg-mul-155.2%
unsub-neg55.2%
Simplified55.2%
if 0.75 < y Initial program 55.4%
associate-*r/71.0%
*-commutative71.0%
distribute-rgt1-in66.6%
fma-def70.9%
cube-unmult71.0%
Simplified71.0%
Taylor expanded in y around inf 63.0%
unpow263.0%
Simplified63.0%
*-un-lft-identity63.0%
times-frac75.4%
Applied egg-rr75.4%
associate-*l/75.5%
*-lft-identity75.5%
Simplified75.5%
Final simplification61.1%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (/ y x) (/ 1.0 x))) (t_1 (- (/ x y) x)))
(if (<= y -7.6e-106)
t_0
(if (<= y 1.75e-204)
(/ (- y) (- x))
(if (<= y 4.5e-124)
t_0
(if (<= y 1.3e-68)
t_1
(if (<= y 2.05e-54)
(/ y (* x x))
(if (<= y 0.75) t_1 (/ (/ x y) y)))))))))
double code(double x, double y) {
double t_0 = (y / x) * (1.0 / x);
double t_1 = (x / y) - x;
double tmp;
if (y <= -7.6e-106) {
tmp = t_0;
} else if (y <= 1.75e-204) {
tmp = -y / -x;
} else if (y <= 4.5e-124) {
tmp = t_0;
} else if (y <= 1.3e-68) {
tmp = t_1;
} else if (y <= 2.05e-54) {
tmp = y / (x * x);
} else if (y <= 0.75) {
tmp = t_1;
} 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 = (y / x) * (1.0d0 / x)
t_1 = (x / y) - x
if (y <= (-7.6d-106)) then
tmp = t_0
else if (y <= 1.75d-204) then
tmp = -y / -x
else if (y <= 4.5d-124) then
tmp = t_0
else if (y <= 1.3d-68) then
tmp = t_1
else if (y <= 2.05d-54) then
tmp = y / (x * x)
else if (y <= 0.75d0) then
tmp = t_1
else
tmp = (x / y) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (y / x) * (1.0 / x);
double t_1 = (x / y) - x;
double tmp;
if (y <= -7.6e-106) {
tmp = t_0;
} else if (y <= 1.75e-204) {
tmp = -y / -x;
} else if (y <= 4.5e-124) {
tmp = t_0;
} else if (y <= 1.3e-68) {
tmp = t_1;
} else if (y <= 2.05e-54) {
tmp = y / (x * x);
} else if (y <= 0.75) {
tmp = t_1;
} else {
tmp = (x / y) / y;
}
return tmp;
}
def code(x, y): t_0 = (y / x) * (1.0 / x) t_1 = (x / y) - x tmp = 0 if y <= -7.6e-106: tmp = t_0 elif y <= 1.75e-204: tmp = -y / -x elif y <= 4.5e-124: tmp = t_0 elif y <= 1.3e-68: tmp = t_1 elif y <= 2.05e-54: tmp = y / (x * x) elif y <= 0.75: tmp = t_1 else: tmp = (x / y) / y return tmp
function code(x, y) t_0 = Float64(Float64(y / x) * Float64(1.0 / x)) t_1 = Float64(Float64(x / y) - x) tmp = 0.0 if (y <= -7.6e-106) tmp = t_0; elseif (y <= 1.75e-204) tmp = Float64(Float64(-y) / Float64(-x)); elseif (y <= 4.5e-124) tmp = t_0; elseif (y <= 1.3e-68) tmp = t_1; elseif (y <= 2.05e-54) tmp = Float64(y / Float64(x * x)); elseif (y <= 0.75) tmp = t_1; else tmp = Float64(Float64(x / y) / y); end return tmp end
function tmp_2 = code(x, y) t_0 = (y / x) * (1.0 / x); t_1 = (x / y) - x; tmp = 0.0; if (y <= -7.6e-106) tmp = t_0; elseif (y <= 1.75e-204) tmp = -y / -x; elseif (y <= 4.5e-124) tmp = t_0; elseif (y <= 1.3e-68) tmp = t_1; elseif (y <= 2.05e-54) tmp = y / (x * x); elseif (y <= 0.75) tmp = t_1; else tmp = (x / y) / y; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(y / x), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision]}, If[LessEqual[y, -7.6e-106], t$95$0, If[LessEqual[y, 1.75e-204], N[((-y) / (-x)), $MachinePrecision], If[LessEqual[y, 4.5e-124], t$95$0, If[LessEqual[y, 1.3e-68], t$95$1, If[LessEqual[y, 2.05e-54], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.75], t$95$1, N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{x} \cdot \frac{1}{x}\\
t_1 := \frac{x}{y} - x\\
\mathbf{if}\;y \leq -7.6 \cdot 10^{-106}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-204}:\\
\;\;\;\;\frac{-y}{-x}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-124}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-68}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{-54}:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;y \leq 0.75:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if y < -7.5999999999999999e-106 or 1.75000000000000013e-204 < y < 4.4999999999999996e-124Initial program 79.9%
times-frac95.4%
/-rgt-identity95.4%
associate-/l/95.4%
*-lft-identity95.4%
associate-+l+95.4%
Simplified95.4%
Taylor expanded in x around inf 46.3%
Taylor expanded in x around inf 39.3%
if -7.5999999999999999e-106 < y < 1.75000000000000013e-204Initial program 69.3%
times-frac84.4%
/-rgt-identity84.4%
associate-/l/84.4%
*-lft-identity84.4%
associate-+l+84.4%
Simplified84.4%
Taylor expanded in x around 0 72.2%
+-commutative72.2%
Simplified72.2%
Taylor expanded in y around 0 72.2%
Taylor expanded in x around inf 80.2%
associate-*l/80.3%
*-un-lft-identity80.3%
frac-2neg80.3%
Applied egg-rr80.3%
if 4.4999999999999996e-124 < y < 1.2999999999999999e-68 or 2.05e-54 < y < 0.75Initial program 82.6%
times-frac99.6%
/-rgt-identity99.6%
associate-/l/99.6%
*-lft-identity99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in x around 0 56.7%
distribute-rgt-in56.8%
*-lft-identity56.8%
Simplified56.8%
Taylor expanded in y around 0 55.2%
neg-mul-155.2%
unsub-neg55.2%
Simplified55.2%
if 1.2999999999999999e-68 < y < 2.05e-54Initial program 99.7%
associate-*r/99.7%
*-commutative99.7%
distribute-rgt1-in49.7%
fma-def99.7%
cube-unmult99.7%
Simplified99.7%
Taylor expanded in x around inf 83.6%
unpow283.6%
Simplified83.6%
if 0.75 < y Initial program 55.4%
associate-*r/71.0%
*-commutative71.0%
distribute-rgt1-in66.6%
fma-def70.9%
cube-unmult71.0%
Simplified71.0%
Taylor expanded in y around inf 63.0%
unpow263.0%
Simplified63.0%
*-un-lft-identity63.0%
times-frac75.4%
Applied egg-rr75.4%
associate-*l/75.5%
*-lft-identity75.5%
Simplified75.5%
Final simplification61.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ y (* y y)))))
(if (<= x -180000000000.0)
(/ y (* x x))
(if (<= x -2.35e-42)
t_0
(if (<= x -4e-130)
(/ (- y) (- x))
(if (<= x 9.5e-27) t_0 (/ (/ x y) y)))))))
double code(double x, double y) {
double t_0 = x / (y + (y * y));
double tmp;
if (x <= -180000000000.0) {
tmp = y / (x * x);
} else if (x <= -2.35e-42) {
tmp = t_0;
} else if (x <= -4e-130) {
tmp = -y / -x;
} else if (x <= 9.5e-27) {
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 + (y * y))
if (x <= (-180000000000.0d0)) then
tmp = y / (x * x)
else if (x <= (-2.35d-42)) then
tmp = t_0
else if (x <= (-4d-130)) then
tmp = -y / -x
else if (x <= 9.5d-27) 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 + (y * y));
double tmp;
if (x <= -180000000000.0) {
tmp = y / (x * x);
} else if (x <= -2.35e-42) {
tmp = t_0;
} else if (x <= -4e-130) {
tmp = -y / -x;
} else if (x <= 9.5e-27) {
tmp = t_0;
} else {
tmp = (x / y) / y;
}
return tmp;
}
def code(x, y): t_0 = x / (y + (y * y)) tmp = 0 if x <= -180000000000.0: tmp = y / (x * x) elif x <= -2.35e-42: tmp = t_0 elif x <= -4e-130: tmp = -y / -x elif x <= 9.5e-27: tmp = t_0 else: tmp = (x / y) / y return tmp
function code(x, y) t_0 = Float64(x / Float64(y + Float64(y * y))) tmp = 0.0 if (x <= -180000000000.0) tmp = Float64(y / Float64(x * x)); elseif (x <= -2.35e-42) tmp = t_0; elseif (x <= -4e-130) tmp = Float64(Float64(-y) / Float64(-x)); elseif (x <= 9.5e-27) tmp = t_0; else tmp = Float64(Float64(x / y) / y); end return tmp end
function tmp_2 = code(x, y) t_0 = x / (y + (y * y)); tmp = 0.0; if (x <= -180000000000.0) tmp = y / (x * x); elseif (x <= -2.35e-42) tmp = t_0; elseif (x <= -4e-130) tmp = -y / -x; elseif (x <= 9.5e-27) tmp = t_0; else tmp = (x / y) / y; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -180000000000.0], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.35e-42], t$95$0, If[LessEqual[x, -4e-130], N[((-y) / (-x)), $MachinePrecision], If[LessEqual[x, 9.5e-27], t$95$0, N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{y + y \cdot y}\\
\mathbf{if}\;x \leq -180000000000:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;x \leq -2.35 \cdot 10^{-42}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -4 \cdot 10^{-130}:\\
\;\;\;\;\frac{-y}{-x}\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{-27}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if x < -1.8e11Initial program 66.0%
associate-*r/74.6%
*-commutative74.6%
distribute-rgt1-in28.2%
fma-def74.6%
cube-unmult74.7%
Simplified74.7%
Taylor expanded in x around inf 77.1%
unpow277.1%
Simplified77.1%
if -1.8e11 < x < -2.35e-42 or -4.0000000000000003e-130 < x < 9.50000000000000037e-27Initial program 75.5%
times-frac88.9%
/-rgt-identity88.9%
associate-/l/88.9%
*-lft-identity88.9%
associate-+l+88.9%
Simplified88.9%
Taylor expanded in x around 0 79.3%
distribute-rgt-in79.3%
*-lft-identity79.3%
Simplified79.3%
if -2.35e-42 < x < -4.0000000000000003e-130Initial program 73.9%
times-frac99.5%
/-rgt-identity99.5%
associate-/l/99.5%
*-lft-identity99.5%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in x around 0 99.5%
+-commutative99.5%
Simplified99.5%
Taylor expanded in y around 0 95.1%
Taylor expanded in x around inf 47.6%
associate-*l/47.7%
*-un-lft-identity47.7%
frac-2neg47.7%
Applied egg-rr47.7%
if 9.50000000000000037e-27 < x Initial program 70.8%
associate-*r/79.2%
*-commutative79.2%
distribute-rgt1-in71.9%
fma-def79.2%
cube-unmult79.2%
Simplified79.2%
Taylor expanded in y around inf 21.3%
unpow221.3%
Simplified21.3%
*-un-lft-identity21.3%
times-frac23.4%
Applied egg-rr23.4%
associate-*l/23.4%
*-lft-identity23.4%
Simplified23.4%
Final simplification60.7%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ y (* x (+ x 1.0)))))
(if (<= y 3.3e-124)
t_0
(if (<= y 1.35e-68)
(- (/ x y) x)
(if (<= y 5.2e-44)
t_0
(if (<= y 1e+16) (/ x (+ y (* y y))) (/ (/ x y) y)))))))
double code(double x, double y) {
double t_0 = y / (x * (x + 1.0));
double tmp;
if (y <= 3.3e-124) {
tmp = t_0;
} else if (y <= 1.35e-68) {
tmp = (x / y) - x;
} else if (y <= 5.2e-44) {
tmp = t_0;
} else if (y <= 1e+16) {
tmp = x / (y + (y * y));
} 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 = y / (x * (x + 1.0d0))
if (y <= 3.3d-124) then
tmp = t_0
else if (y <= 1.35d-68) then
tmp = (x / y) - x
else if (y <= 5.2d-44) then
tmp = t_0
else if (y <= 1d+16) then
tmp = x / (y + (y * y))
else
tmp = (x / y) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y / (x * (x + 1.0));
double tmp;
if (y <= 3.3e-124) {
tmp = t_0;
} else if (y <= 1.35e-68) {
tmp = (x / y) - x;
} else if (y <= 5.2e-44) {
tmp = t_0;
} else if (y <= 1e+16) {
tmp = x / (y + (y * y));
} else {
tmp = (x / y) / y;
}
return tmp;
}
def code(x, y): t_0 = y / (x * (x + 1.0)) tmp = 0 if y <= 3.3e-124: tmp = t_0 elif y <= 1.35e-68: tmp = (x / y) - x elif y <= 5.2e-44: tmp = t_0 elif y <= 1e+16: tmp = x / (y + (y * y)) else: tmp = (x / y) / y return tmp
function code(x, y) t_0 = Float64(y / Float64(x * Float64(x + 1.0))) tmp = 0.0 if (y <= 3.3e-124) tmp = t_0; elseif (y <= 1.35e-68) tmp = Float64(Float64(x / y) - x); elseif (y <= 5.2e-44) tmp = t_0; elseif (y <= 1e+16) tmp = Float64(x / Float64(y + Float64(y * y))); else tmp = Float64(Float64(x / y) / y); end return tmp end
function tmp_2 = code(x, y) t_0 = y / (x * (x + 1.0)); tmp = 0.0; if (y <= 3.3e-124) tmp = t_0; elseif (y <= 1.35e-68) tmp = (x / y) - x; elseif (y <= 5.2e-44) tmp = t_0; elseif (y <= 1e+16) tmp = x / (y + (y * y)); else tmp = (x / y) / y; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 3.3e-124], t$95$0, If[LessEqual[y, 1.35e-68], N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[y, 5.2e-44], t$95$0, If[LessEqual[y, 1e+16], N[(x / N[(y + N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{if}\;y \leq 3.3 \cdot 10^{-124}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{-68}:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-44}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 10^{+16}:\\
\;\;\;\;\frac{x}{y + y \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if y < 3.29999999999999984e-124 or 1.3500000000000001e-68 < y < 5.1999999999999996e-44Initial program 77.0%
times-frac91.4%
/-rgt-identity91.4%
associate-/l/91.4%
*-lft-identity91.4%
associate-+l+91.4%
Simplified91.4%
Taylor expanded in y around 0 65.0%
if 3.29999999999999984e-124 < y < 1.3500000000000001e-68Initial program 47.3%
times-frac99.5%
/-rgt-identity99.5%
associate-/l/99.5%
*-lft-identity99.5%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in x around 0 83.6%
distribute-rgt-in83.6%
*-lft-identity83.6%
Simplified83.6%
Taylor expanded in y around 0 83.6%
neg-mul-183.6%
unsub-neg83.6%
Simplified83.6%
if 5.1999999999999996e-44 < y < 1e16Initial program 93.6%
times-frac99.4%
/-rgt-identity99.4%
associate-/l/99.4%
*-lft-identity99.4%
associate-+l+99.4%
Simplified99.4%
Taylor expanded in x around 0 60.5%
distribute-rgt-in60.7%
*-lft-identity60.7%
Simplified60.7%
if 1e16 < y Initial program 54.0%
associate-*r/70.0%
*-commutative70.0%
distribute-rgt1-in65.6%
fma-def70.0%
cube-unmult70.1%
Simplified70.1%
Taylor expanded in y around inf 62.6%
unpow262.6%
Simplified62.6%
*-un-lft-identity62.6%
times-frac75.4%
Applied egg-rr75.4%
associate-*l/75.5%
*-lft-identity75.5%
Simplified75.5%
Final simplification67.8%
(FPCore (x y)
:precision binary64
(if (<= y 4.5e-124)
(/ y (+ x (* x x)))
(if (<= y 1.3e-68)
(- (/ x y) x)
(if (<= y 7e-44)
(/ y (* x (+ x 1.0)))
(if (<= y 2e+17) (/ x (+ y (* y y))) (/ (/ x y) y))))))
double code(double x, double y) {
double tmp;
if (y <= 4.5e-124) {
tmp = y / (x + (x * x));
} else if (y <= 1.3e-68) {
tmp = (x / y) - x;
} else if (y <= 7e-44) {
tmp = y / (x * (x + 1.0));
} else if (y <= 2e+17) {
tmp = x / (y + (y * y));
} 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.5d-124) then
tmp = y / (x + (x * x))
else if (y <= 1.3d-68) then
tmp = (x / y) - x
else if (y <= 7d-44) then
tmp = y / (x * (x + 1.0d0))
else if (y <= 2d+17) then
tmp = x / (y + (y * y))
else
tmp = (x / y) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 4.5e-124) {
tmp = y / (x + (x * x));
} else if (y <= 1.3e-68) {
tmp = (x / y) - x;
} else if (y <= 7e-44) {
tmp = y / (x * (x + 1.0));
} else if (y <= 2e+17) {
tmp = x / (y + (y * y));
} else {
tmp = (x / y) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 4.5e-124: tmp = y / (x + (x * x)) elif y <= 1.3e-68: tmp = (x / y) - x elif y <= 7e-44: tmp = y / (x * (x + 1.0)) elif y <= 2e+17: tmp = x / (y + (y * y)) else: tmp = (x / y) / y return tmp
function code(x, y) tmp = 0.0 if (y <= 4.5e-124) tmp = Float64(y / Float64(x + Float64(x * x))); elseif (y <= 1.3e-68) tmp = Float64(Float64(x / y) - x); elseif (y <= 7e-44) tmp = Float64(y / Float64(x * Float64(x + 1.0))); elseif (y <= 2e+17) tmp = Float64(x / Float64(y + Float64(y * y))); else tmp = Float64(Float64(x / y) / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 4.5e-124) tmp = y / (x + (x * x)); elseif (y <= 1.3e-68) tmp = (x / y) - x; elseif (y <= 7e-44) tmp = y / (x * (x + 1.0)); elseif (y <= 2e+17) tmp = x / (y + (y * y)); else tmp = (x / y) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 4.5e-124], N[(y / N[(x + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e-68], N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[y, 7e-44], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e+17], N[(x / N[(y + N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.5 \cdot 10^{-124}:\\
\;\;\;\;\frac{y}{x + x \cdot x}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-68}:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-44}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+17}:\\
\;\;\;\;\frac{x}{y + y \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y}\\
\end{array}
\end{array}
if y < 4.4999999999999996e-124Initial program 75.5%
times-frac90.7%
associate-+r+90.7%
associate-*l/82.2%
times-frac99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 64.1%
*-commutative64.1%
distribute-lft-in64.2%
*-rgt-identity64.2%
Simplified64.2%
if 4.4999999999999996e-124 < y < 1.2999999999999999e-68Initial program 47.3%
times-frac99.5%
/-rgt-identity99.5%
associate-/l/99.5%
*-lft-identity99.5%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in x around 0 83.6%
distribute-rgt-in83.6%
*-lft-identity83.6%
Simplified83.6%
Taylor expanded in y around 0 83.6%
neg-mul-183.6%
unsub-neg83.6%
Simplified83.6%
if 1.2999999999999999e-68 < y < 6.9999999999999995e-44Initial program 97.7%
times-frac99.7%
/-rgt-identity99.7%
associate-/l/99.7%
*-lft-identity99.7%
associate-+l+99.7%
Simplified99.7%
Taylor expanded in y around 0 76.5%
if 6.9999999999999995e-44 < y < 2e17Initial program 93.6%
times-frac99.4%
/-rgt-identity99.4%
associate-/l/99.4%
*-lft-identity99.4%
associate-+l+99.4%
Simplified99.4%
Taylor expanded in x around 0 60.5%
distribute-rgt-in60.7%
*-lft-identity60.7%
Simplified60.7%
if 2e17 < y Initial program 54.0%
associate-*r/70.0%
*-commutative70.0%
distribute-rgt1-in65.6%
fma-def70.0%
cube-unmult70.1%
Simplified70.1%
Taylor expanded in y around inf 62.6%
unpow262.6%
Simplified62.6%
*-un-lft-identity62.6%
times-frac75.4%
Applied egg-rr75.4%
associate-*l/75.5%
*-lft-identity75.5%
Simplified75.5%
Final simplification67.8%
(FPCore (x y)
:precision binary64
(if (<= y 4.5e-124)
(/ y (+ x (* x x)))
(if (<= y 6.1e-68)
(- (/ x y) x)
(if (<= y 3.8e-44)
(/ y (* x (+ x 1.0)))
(if (<= y 4.5e+15) (/ x (+ y (* y y))) (/ (/ x (+ x y)) y))))))
double code(double x, double y) {
double tmp;
if (y <= 4.5e-124) {
tmp = y / (x + (x * x));
} else if (y <= 6.1e-68) {
tmp = (x / y) - x;
} else if (y <= 3.8e-44) {
tmp = y / (x * (x + 1.0));
} else if (y <= 4.5e+15) {
tmp = x / (y + (y * y));
} else {
tmp = (x / (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.5d-124) then
tmp = y / (x + (x * x))
else if (y <= 6.1d-68) then
tmp = (x / y) - x
else if (y <= 3.8d-44) then
tmp = y / (x * (x + 1.0d0))
else if (y <= 4.5d+15) then
tmp = x / (y + (y * y))
else
tmp = (x / (x + y)) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 4.5e-124) {
tmp = y / (x + (x * x));
} else if (y <= 6.1e-68) {
tmp = (x / y) - x;
} else if (y <= 3.8e-44) {
tmp = y / (x * (x + 1.0));
} else if (y <= 4.5e+15) {
tmp = x / (y + (y * y));
} else {
tmp = (x / (x + y)) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 4.5e-124: tmp = y / (x + (x * x)) elif y <= 6.1e-68: tmp = (x / y) - x elif y <= 3.8e-44: tmp = y / (x * (x + 1.0)) elif y <= 4.5e+15: tmp = x / (y + (y * y)) else: tmp = (x / (x + y)) / y return tmp
function code(x, y) tmp = 0.0 if (y <= 4.5e-124) tmp = Float64(y / Float64(x + Float64(x * x))); elseif (y <= 6.1e-68) tmp = Float64(Float64(x / y) - x); elseif (y <= 3.8e-44) tmp = Float64(y / Float64(x * Float64(x + 1.0))); elseif (y <= 4.5e+15) tmp = Float64(x / Float64(y + Float64(y * y))); else tmp = Float64(Float64(x / Float64(x + y)) / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 4.5e-124) tmp = y / (x + (x * x)); elseif (y <= 6.1e-68) tmp = (x / y) - x; elseif (y <= 3.8e-44) tmp = y / (x * (x + 1.0)); elseif (y <= 4.5e+15) tmp = x / (y + (y * y)); else tmp = (x / (x + y)) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 4.5e-124], N[(y / N[(x + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.1e-68], N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[y, 3.8e-44], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+15], N[(x / N[(y + N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.5 \cdot 10^{-124}:\\
\;\;\;\;\frac{y}{x + x \cdot x}\\
\mathbf{elif}\;y \leq 6.1 \cdot 10^{-68}:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{-44}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+15}:\\
\;\;\;\;\frac{x}{y + y \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{x + y}}{y}\\
\end{array}
\end{array}
if y < 4.4999999999999996e-124Initial program 75.5%
times-frac90.7%
associate-+r+90.7%
associate-*l/82.2%
times-frac99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 64.1%
*-commutative64.1%
distribute-lft-in64.2%
*-rgt-identity64.2%
Simplified64.2%
if 4.4999999999999996e-124 < y < 6.1e-68Initial program 47.3%
times-frac99.5%
/-rgt-identity99.5%
associate-/l/99.5%
*-lft-identity99.5%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in x around 0 83.6%
distribute-rgt-in83.6%
*-lft-identity83.6%
Simplified83.6%
Taylor expanded in y around 0 83.6%
neg-mul-183.6%
unsub-neg83.6%
Simplified83.6%
if 6.1e-68 < y < 3.8000000000000001e-44Initial program 97.7%
times-frac99.7%
/-rgt-identity99.7%
associate-/l/99.7%
*-lft-identity99.7%
associate-+l+99.7%
Simplified99.7%
Taylor expanded in y around 0 76.5%
if 3.8000000000000001e-44 < y < 4.5e15Initial program 93.6%
times-frac99.4%
/-rgt-identity99.4%
associate-/l/99.4%
*-lft-identity99.4%
associate-+l+99.4%
Simplified99.4%
Taylor expanded in x around 0 60.5%
distribute-rgt-in60.7%
*-lft-identity60.7%
Simplified60.7%
if 4.5e15 < y Initial program 54.0%
times-frac79.0%
/-rgt-identity79.0%
associate-/l/79.0%
*-lft-identity79.0%
associate-+l+79.0%
Simplified79.0%
Taylor expanded in x around 0 71.6%
+-commutative71.6%
Simplified71.6%
*-commutative71.6%
clear-num71.6%
associate-/r*76.4%
+-commutative76.4%
+-commutative76.4%
frac-times76.4%
*-un-lft-identity76.4%
+-commutative76.4%
+-commutative76.4%
Applied egg-rr76.4%
Taylor expanded in y around inf 75.9%
Final simplification67.9%
(FPCore (x y)
:precision binary64
(if (<= y 4.5e-124)
(* (/ 1.0 x) (/ y (+ x 1.0)))
(if (<= y 1.3e-68)
(- (/ x y) x)
(if (<= y 5e-44)
(/ y (* x (+ x 1.0)))
(if (<= y 2.7e+15) (/ x (+ y (* y y))) (/ (/ x (+ x y)) y))))))
double code(double x, double y) {
double tmp;
if (y <= 4.5e-124) {
tmp = (1.0 / x) * (y / (x + 1.0));
} else if (y <= 1.3e-68) {
tmp = (x / y) - x;
} else if (y <= 5e-44) {
tmp = y / (x * (x + 1.0));
} else if (y <= 2.7e+15) {
tmp = x / (y + (y * y));
} else {
tmp = (x / (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.5d-124) then
tmp = (1.0d0 / x) * (y / (x + 1.0d0))
else if (y <= 1.3d-68) then
tmp = (x / y) - x
else if (y <= 5d-44) then
tmp = y / (x * (x + 1.0d0))
else if (y <= 2.7d+15) then
tmp = x / (y + (y * y))
else
tmp = (x / (x + y)) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 4.5e-124) {
tmp = (1.0 / x) * (y / (x + 1.0));
} else if (y <= 1.3e-68) {
tmp = (x / y) - x;
} else if (y <= 5e-44) {
tmp = y / (x * (x + 1.0));
} else if (y <= 2.7e+15) {
tmp = x / (y + (y * y));
} else {
tmp = (x / (x + y)) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 4.5e-124: tmp = (1.0 / x) * (y / (x + 1.0)) elif y <= 1.3e-68: tmp = (x / y) - x elif y <= 5e-44: tmp = y / (x * (x + 1.0)) elif y <= 2.7e+15: tmp = x / (y + (y * y)) else: tmp = (x / (x + y)) / y return tmp
function code(x, y) tmp = 0.0 if (y <= 4.5e-124) tmp = Float64(Float64(1.0 / x) * Float64(y / Float64(x + 1.0))); elseif (y <= 1.3e-68) tmp = Float64(Float64(x / y) - x); elseif (y <= 5e-44) tmp = Float64(y / Float64(x * Float64(x + 1.0))); elseif (y <= 2.7e+15) tmp = Float64(x / Float64(y + Float64(y * y))); else tmp = Float64(Float64(x / Float64(x + y)) / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 4.5e-124) tmp = (1.0 / x) * (y / (x + 1.0)); elseif (y <= 1.3e-68) tmp = (x / y) - x; elseif (y <= 5e-44) tmp = y / (x * (x + 1.0)); elseif (y <= 2.7e+15) tmp = x / (y + (y * y)); else tmp = (x / (x + y)) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 4.5e-124], N[(N[(1.0 / x), $MachinePrecision] * N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e-68], N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[y, 5e-44], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e+15], N[(x / N[(y + N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.5 \cdot 10^{-124}:\\
\;\;\;\;\frac{1}{x} \cdot \frac{y}{x + 1}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-68}:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{elif}\;y \leq 5 \cdot 10^{-44}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+15}:\\
\;\;\;\;\frac{x}{y + y \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{x + y}}{y}\\
\end{array}
\end{array}
if y < 4.4999999999999996e-124Initial program 75.5%
times-frac90.7%
/-rgt-identity90.7%
associate-/l/90.7%
*-lft-identity90.7%
associate-+l+90.7%
Simplified90.7%
Taylor expanded in x around inf 65.7%
Taylor expanded in y around 0 65.4%
+-commutative65.4%
Simplified65.4%
if 4.4999999999999996e-124 < y < 1.2999999999999999e-68Initial program 47.3%
times-frac99.5%
/-rgt-identity99.5%
associate-/l/99.5%
*-lft-identity99.5%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in x around 0 83.6%
distribute-rgt-in83.6%
*-lft-identity83.6%
Simplified83.6%
Taylor expanded in y around 0 83.6%
neg-mul-183.6%
unsub-neg83.6%
Simplified83.6%
if 1.2999999999999999e-68 < y < 5.00000000000000039e-44Initial program 97.7%
times-frac99.7%
/-rgt-identity99.7%
associate-/l/99.7%
*-lft-identity99.7%
associate-+l+99.7%
Simplified99.7%
Taylor expanded in y around 0 76.5%
if 5.00000000000000039e-44 < y < 2.7e15Initial program 93.6%
times-frac99.4%
/-rgt-identity99.4%
associate-/l/99.4%
*-lft-identity99.4%
associate-+l+99.4%
Simplified99.4%
Taylor expanded in x around 0 60.5%
distribute-rgt-in60.7%
*-lft-identity60.7%
Simplified60.7%
if 2.7e15 < y Initial program 54.0%
times-frac79.0%
/-rgt-identity79.0%
associate-/l/79.0%
*-lft-identity79.0%
associate-+l+79.0%
Simplified79.0%
Taylor expanded in x around 0 71.6%
+-commutative71.6%
Simplified71.6%
*-commutative71.6%
clear-num71.6%
associate-/r*76.4%
+-commutative76.4%
+-commutative76.4%
frac-times76.4%
*-un-lft-identity76.4%
+-commutative76.4%
+-commutative76.4%
Applied egg-rr76.4%
Taylor expanded in y around inf 75.9%
Final simplification68.7%
(FPCore (x y)
:precision binary64
(if (<= y 4.5e-124)
(* (/ 1.0 x) (/ y (+ x 1.0)))
(if (<= y 1.55e-68)
(- (/ x y) x)
(if (<= y 3.5e-54) (/ y (* x (+ x 1.0))) (/ (/ x (+ x y)) (+ y 1.0))))))
double code(double x, double y) {
double tmp;
if (y <= 4.5e-124) {
tmp = (1.0 / x) * (y / (x + 1.0));
} else if (y <= 1.55e-68) {
tmp = (x / y) - x;
} else if (y <= 3.5e-54) {
tmp = y / (x * (x + 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 <= 4.5d-124) then
tmp = (1.0d0 / x) * (y / (x + 1.0d0))
else if (y <= 1.55d-68) then
tmp = (x / y) - x
else if (y <= 3.5d-54) then
tmp = y / (x * (x + 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 <= 4.5e-124) {
tmp = (1.0 / x) * (y / (x + 1.0));
} else if (y <= 1.55e-68) {
tmp = (x / y) - x;
} else if (y <= 3.5e-54) {
tmp = y / (x * (x + 1.0));
} else {
tmp = (x / (x + y)) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 4.5e-124: tmp = (1.0 / x) * (y / (x + 1.0)) elif y <= 1.55e-68: tmp = (x / y) - x elif y <= 3.5e-54: tmp = y / (x * (x + 1.0)) else: tmp = (x / (x + y)) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (y <= 4.5e-124) tmp = Float64(Float64(1.0 / x) * Float64(y / Float64(x + 1.0))); elseif (y <= 1.55e-68) tmp = Float64(Float64(x / y) - x); elseif (y <= 3.5e-54) tmp = Float64(y / Float64(x * Float64(x + 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 <= 4.5e-124) tmp = (1.0 / x) * (y / (x + 1.0)); elseif (y <= 1.55e-68) tmp = (x / y) - x; elseif (y <= 3.5e-54) tmp = y / (x * (x + 1.0)); else tmp = (x / (x + y)) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 4.5e-124], N[(N[(1.0 / x), $MachinePrecision] * N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e-68], N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[y, 3.5e-54], N[(y / N[(x * N[(x + 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 4.5 \cdot 10^{-124}:\\
\;\;\;\;\frac{1}{x} \cdot \frac{y}{x + 1}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-68}:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-54}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{x + y}}{y + 1}\\
\end{array}
\end{array}
if y < 4.4999999999999996e-124Initial program 75.5%
times-frac90.7%
/-rgt-identity90.7%
associate-/l/90.7%
*-lft-identity90.7%
associate-+l+90.7%
Simplified90.7%
Taylor expanded in x around inf 65.7%
Taylor expanded in y around 0 65.4%
+-commutative65.4%
Simplified65.4%
if 4.4999999999999996e-124 < y < 1.55e-68Initial program 47.3%
times-frac99.5%
/-rgt-identity99.5%
associate-/l/99.5%
*-lft-identity99.5%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in x around 0 83.6%
distribute-rgt-in83.6%
*-lft-identity83.6%
Simplified83.6%
Taylor expanded in y around 0 83.6%
neg-mul-183.6%
unsub-neg83.6%
Simplified83.6%
if 1.55e-68 < y < 3.49999999999999982e-54Initial program 99.7%
times-frac99.6%
/-rgt-identity99.6%
associate-/l/99.6%
*-lft-identity99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in y around 0 85.2%
if 3.49999999999999982e-54 < y Initial program 64.0%
times-frac84.1%
/-rgt-identity84.1%
associate-/l/84.1%
*-lft-identity84.1%
associate-+l+84.1%
Simplified84.1%
Taylor expanded in x around 0 75.2%
+-commutative75.2%
Simplified75.2%
*-commutative75.2%
clear-num75.1%
associate-/r*73.3%
+-commutative73.3%
+-commutative73.3%
frac-times73.3%
*-un-lft-identity73.3%
+-commutative73.3%
+-commutative73.3%
Applied egg-rr73.3%
Taylor expanded in x around 0 70.5%
+-commutative70.5%
Simplified70.5%
Final simplification68.0%
(FPCore (x y)
:precision binary64
(if (<= y 4.5e-124)
(/ (/ y x) (+ x (+ y 1.0)))
(if (<= y 1.3e-68)
(- (/ x y) x)
(if (<= y 3.5e-54) (/ y (* x (+ x 1.0))) (/ (/ x (+ x y)) (+ y 1.0))))))
double code(double x, double y) {
double tmp;
if (y <= 4.5e-124) {
tmp = (y / x) / (x + (y + 1.0));
} else if (y <= 1.3e-68) {
tmp = (x / y) - x;
} else if (y <= 3.5e-54) {
tmp = y / (x * (x + 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 <= 4.5d-124) then
tmp = (y / x) / (x + (y + 1.0d0))
else if (y <= 1.3d-68) then
tmp = (x / y) - x
else if (y <= 3.5d-54) then
tmp = y / (x * (x + 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 <= 4.5e-124) {
tmp = (y / x) / (x + (y + 1.0));
} else if (y <= 1.3e-68) {
tmp = (x / y) - x;
} else if (y <= 3.5e-54) {
tmp = y / (x * (x + 1.0));
} else {
tmp = (x / (x + y)) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 4.5e-124: tmp = (y / x) / (x + (y + 1.0)) elif y <= 1.3e-68: tmp = (x / y) - x elif y <= 3.5e-54: tmp = y / (x * (x + 1.0)) else: tmp = (x / (x + y)) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (y <= 4.5e-124) tmp = Float64(Float64(y / x) / Float64(x + Float64(y + 1.0))); elseif (y <= 1.3e-68) tmp = Float64(Float64(x / y) - x); elseif (y <= 3.5e-54) tmp = Float64(y / Float64(x * Float64(x + 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 <= 4.5e-124) tmp = (y / x) / (x + (y + 1.0)); elseif (y <= 1.3e-68) tmp = (x / y) - x; elseif (y <= 3.5e-54) tmp = y / (x * (x + 1.0)); else tmp = (x / (x + y)) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 4.5e-124], N[(N[(y / x), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e-68], N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[y, 3.5e-54], N[(y / N[(x * N[(x + 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 4.5 \cdot 10^{-124}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + \left(y + 1\right)}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-68}:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-54}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{x + y}}{y + 1}\\
\end{array}
\end{array}
if y < 4.4999999999999996e-124Initial program 75.5%
times-frac90.7%
/-rgt-identity90.7%
associate-/l/90.7%
*-lft-identity90.7%
associate-+l+90.7%
Simplified90.7%
Taylor expanded in x around inf 65.7%
expm1-log1p-u65.1%
expm1-udef40.7%
frac-times40.7%
*-un-lft-identity40.7%
Applied egg-rr40.7%
expm1-def65.0%
expm1-log1p65.5%
associate-/r*65.7%
Simplified65.7%
if 4.4999999999999996e-124 < y < 1.2999999999999999e-68Initial program 47.3%
times-frac99.5%
/-rgt-identity99.5%
associate-/l/99.5%
*-lft-identity99.5%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in x around 0 83.6%
distribute-rgt-in83.6%
*-lft-identity83.6%
Simplified83.6%
Taylor expanded in y around 0 83.6%
neg-mul-183.6%
unsub-neg83.6%
Simplified83.6%
if 1.2999999999999999e-68 < y < 3.49999999999999982e-54Initial program 99.7%
times-frac99.6%
/-rgt-identity99.6%
associate-/l/99.6%
*-lft-identity99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in y around 0 85.2%
if 3.49999999999999982e-54 < y Initial program 64.0%
times-frac84.1%
/-rgt-identity84.1%
associate-/l/84.1%
*-lft-identity84.1%
associate-+l+84.1%
Simplified84.1%
Taylor expanded in x around 0 75.2%
+-commutative75.2%
Simplified75.2%
*-commutative75.2%
clear-num75.1%
associate-/r*73.3%
+-commutative73.3%
+-commutative73.3%
frac-times73.3%
*-un-lft-identity73.3%
+-commutative73.3%
+-commutative73.3%
Applied egg-rr73.3%
Taylor expanded in x around 0 70.5%
+-commutative70.5%
Simplified70.5%
Final simplification68.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (* (+ x y) (+ x y)))))
(if (<= y 6e-127)
(/ (/ y x) (+ x (+ y 1.0)))
(if (<= y 0.00025)
(* y t_0)
(if (<= y 1.15e+148) t_0 (/ (/ x (+ x y)) y))))))
double code(double x, double y) {
double t_0 = x / ((x + y) * (x + y));
double tmp;
if (y <= 6e-127) {
tmp = (y / x) / (x + (y + 1.0));
} else if (y <= 0.00025) {
tmp = y * t_0;
} else if (y <= 1.15e+148) {
tmp = t_0;
} else {
tmp = (x / (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 / ((x + y) * (x + y))
if (y <= 6d-127) then
tmp = (y / x) / (x + (y + 1.0d0))
else if (y <= 0.00025d0) then
tmp = y * t_0
else if (y <= 1.15d+148) then
tmp = t_0
else
tmp = (x / (x + y)) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / ((x + y) * (x + y));
double tmp;
if (y <= 6e-127) {
tmp = (y / x) / (x + (y + 1.0));
} else if (y <= 0.00025) {
tmp = y * t_0;
} else if (y <= 1.15e+148) {
tmp = t_0;
} else {
tmp = (x / (x + y)) / y;
}
return tmp;
}
def code(x, y): t_0 = x / ((x + y) * (x + y)) tmp = 0 if y <= 6e-127: tmp = (y / x) / (x + (y + 1.0)) elif y <= 0.00025: tmp = y * t_0 elif y <= 1.15e+148: tmp = t_0 else: tmp = (x / (x + y)) / y return tmp
function code(x, y) t_0 = Float64(x / Float64(Float64(x + y) * Float64(x + y))) tmp = 0.0 if (y <= 6e-127) tmp = Float64(Float64(y / x) / Float64(x + Float64(y + 1.0))); elseif (y <= 0.00025) tmp = Float64(y * t_0); elseif (y <= 1.15e+148) tmp = t_0; else tmp = Float64(Float64(x / Float64(x + y)) / y); end return tmp end
function tmp_2 = code(x, y) t_0 = x / ((x + y) * (x + y)); tmp = 0.0; if (y <= 6e-127) tmp = (y / x) / (x + (y + 1.0)); elseif (y <= 0.00025) tmp = y * t_0; elseif (y <= 1.15e+148) tmp = t_0; else tmp = (x / (x + y)) / y; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 6e-127], N[(N[(y / x), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.00025], N[(y * t$95$0), $MachinePrecision], If[LessEqual[y, 1.15e+148], t$95$0, N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{\left(x + y\right) \cdot \left(x + y\right)}\\
\mathbf{if}\;y \leq 6 \cdot 10^{-127}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + \left(y + 1\right)}\\
\mathbf{elif}\;y \leq 0.00025:\\
\;\;\;\;y \cdot t_0\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+148}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{x + y}}{y}\\
\end{array}
\end{array}
if y < 6.00000000000000017e-127Initial program 75.5%
times-frac90.7%
/-rgt-identity90.7%
associate-/l/90.7%
*-lft-identity90.7%
associate-+l+90.7%
Simplified90.7%
Taylor expanded in x around inf 65.7%
expm1-log1p-u65.1%
expm1-udef40.7%
frac-times40.7%
*-un-lft-identity40.7%
Applied egg-rr40.7%
expm1-def65.0%
expm1-log1p65.5%
associate-/r*65.7%
Simplified65.7%
if 6.00000000000000017e-127 < y < 2.5000000000000001e-4Initial program 85.9%
times-frac99.6%
/-rgt-identity99.6%
associate-/l/99.6%
*-lft-identity99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in x around 0 90.4%
+-commutative90.4%
Simplified90.4%
Taylor expanded in y around 0 87.2%
if 2.5000000000000001e-4 < y < 1.15e148Initial program 60.2%
times-frac95.6%
/-rgt-identity95.6%
associate-/l/95.6%
*-lft-identity95.6%
associate-+l+95.6%
Simplified95.6%
Taylor expanded in y around inf 76.4%
if 1.15e148 < y Initial program 52.1%
times-frac68.5%
/-rgt-identity68.5%
associate-/l/68.5%
*-lft-identity68.5%
associate-+l+68.5%
Simplified68.5%
Taylor expanded in x around 0 68.5%
+-commutative68.5%
Simplified68.5%
*-commutative68.5%
clear-num68.5%
associate-/r*90.0%
+-commutative90.0%
+-commutative90.0%
frac-times90.0%
*-un-lft-identity90.0%
+-commutative90.0%
+-commutative90.0%
Applied egg-rr90.0%
Taylor expanded in y around inf 89.9%
Final simplification73.1%
(FPCore (x y) :precision binary64 (if (<= y 4e-124) (* y (/ 1.0 x)) (if (<= y 0.75) (- (/ x y) x) (/ x (* y y)))))
double code(double x, double y) {
double tmp;
if (y <= 4e-124) {
tmp = y * (1.0 / x);
} else if (y <= 0.75) {
tmp = (x / y) - x;
} else {
tmp = x / (y * y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 4d-124) then
tmp = y * (1.0d0 / x)
else if (y <= 0.75d0) then
tmp = (x / y) - x
else
tmp = x / (y * y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 4e-124) {
tmp = y * (1.0 / x);
} else if (y <= 0.75) {
tmp = (x / y) - x;
} else {
tmp = x / (y * y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 4e-124: tmp = y * (1.0 / x) elif y <= 0.75: tmp = (x / y) - x else: tmp = x / (y * y) return tmp
function code(x, y) tmp = 0.0 if (y <= 4e-124) tmp = Float64(y * Float64(1.0 / x)); elseif (y <= 0.75) tmp = Float64(Float64(x / y) - x); else tmp = Float64(x / Float64(y * y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 4e-124) tmp = y * (1.0 / x); elseif (y <= 0.75) tmp = (x / y) - x; else tmp = x / (y * y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 4e-124], N[(y * N[(1.0 / x), $MachinePrecision]), $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 4 \cdot 10^{-124}:\\
\;\;\;\;y \cdot \frac{1}{x}\\
\mathbf{elif}\;y \leq 0.75:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\end{array}
if y < 3.99999999999999973e-124Initial program 75.5%
times-frac90.7%
/-rgt-identity90.7%
associate-/l/90.7%
*-lft-identity90.7%
associate-+l+90.7%
Simplified90.7%
Taylor expanded in x around 0 75.1%
+-commutative75.1%
Simplified75.1%
Taylor expanded in y around 0 71.5%
Taylor expanded in x around inf 42.2%
if 3.99999999999999973e-124 < y < 0.75Initial program 85.9%
times-frac99.6%
/-rgt-identity99.6%
associate-/l/99.6%
*-lft-identity99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in x around 0 47.2%
distribute-rgt-in47.3%
*-lft-identity47.3%
Simplified47.3%
Taylor expanded in y around 0 46.0%
neg-mul-146.0%
unsub-neg46.0%
Simplified46.0%
if 0.75 < y Initial program 55.4%
associate-*r/71.0%
*-commutative71.0%
distribute-rgt1-in66.6%
fma-def70.9%
cube-unmult71.0%
Simplified71.0%
Taylor expanded in y around inf 63.0%
unpow263.0%
Simplified63.0%
Final simplification48.0%
(FPCore (x y) :precision binary64 (if (<= x -7.2e-136) (* y (/ 1.0 x)) (- (/ x y) x)))
double code(double x, double y) {
double tmp;
if (x <= -7.2e-136) {
tmp = y * (1.0 / 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 <= (-7.2d-136)) then
tmp = y * (1.0d0 / x)
else
tmp = (x / y) - x
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -7.2e-136) {
tmp = y * (1.0 / x);
} else {
tmp = (x / y) - x;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -7.2e-136: tmp = y * (1.0 / x) else: tmp = (x / y) - x return tmp
function code(x, y) tmp = 0.0 if (x <= -7.2e-136) tmp = Float64(y * Float64(1.0 / x)); else tmp = Float64(Float64(x / y) - x); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -7.2e-136) tmp = y * (1.0 / x); else tmp = (x / y) - x; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -7.2e-136], N[(y * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.2 \cdot 10^{-136}:\\
\;\;\;\;y \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} - x\\
\end{array}
\end{array}
if x < -7.1999999999999996e-136Initial program 70.7%
times-frac89.5%
/-rgt-identity89.5%
associate-/l/89.5%
*-lft-identity89.5%
associate-+l+89.5%
Simplified89.5%
Taylor expanded in x around 0 70.9%
+-commutative70.9%
Simplified70.9%
Taylor expanded in y around 0 65.3%
Taylor expanded in x around inf 35.9%
if -7.1999999999999996e-136 < x Initial program 72.1%
times-frac88.6%
/-rgt-identity88.6%
associate-/l/88.6%
*-lft-identity88.6%
associate-+l+88.6%
Simplified88.6%
Taylor expanded in x around 0 53.8%
distribute-rgt-in53.9%
*-lft-identity53.9%
Simplified53.9%
Taylor expanded in y around 0 17.9%
neg-mul-117.9%
unsub-neg17.9%
Simplified17.9%
Final simplification25.0%
(FPCore (x y) :precision binary64 (* y (/ 1.0 x)))
double code(double x, double y) {
return y * (1.0 / x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = y * (1.0d0 / x)
end function
public static double code(double x, double y) {
return y * (1.0 / x);
}
def code(x, y): return y * (1.0 / x)
function code(x, y) return Float64(y * Float64(1.0 / x)) end
function tmp = code(x, y) tmp = y * (1.0 / x); end
code[x_, y_] := N[(y * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \frac{1}{x}
\end{array}
Initial program 71.5%
times-frac88.9%
/-rgt-identity88.9%
associate-/l/88.9%
*-lft-identity88.9%
associate-+l+88.9%
Simplified88.9%
Taylor expanded in x around 0 76.3%
+-commutative76.3%
Simplified76.3%
Taylor expanded in y around 0 69.3%
Taylor expanded in x around inf 29.7%
Final simplification29.7%
(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 71.5%
times-frac88.9%
/-rgt-identity88.9%
associate-/l/88.9%
*-lft-identity88.9%
associate-+l+88.9%
Simplified88.9%
Taylor expanded in x around inf 53.8%
Taylor expanded in y around inf 4.2%
Final simplification4.2%
(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 2023196
(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))))