
(FPCore (x y) :precision binary64 (* (* 3.0 (sqrt x)) (- (+ y (/ 1.0 (* x 9.0))) 1.0)))
double code(double x, double y) {
return (3.0 * sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (3.0d0 * sqrt(x)) * ((y + (1.0d0 / (x * 9.0d0))) - 1.0d0)
end function
public static double code(double x, double y) {
return (3.0 * Math.sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0);
}
def code(x, y): return (3.0 * math.sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0)
function code(x, y) return Float64(Float64(3.0 * sqrt(x)) * Float64(Float64(y + Float64(1.0 / Float64(x * 9.0))) - 1.0)) end
function tmp = code(x, y) tmp = (3.0 * sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0); end
code[x_, y_] := N[(N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[(N[(y + N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (* (* 3.0 (sqrt x)) (- (+ y (/ 1.0 (* x 9.0))) 1.0)))
double code(double x, double y) {
return (3.0 * sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (3.0d0 * sqrt(x)) * ((y + (1.0d0 / (x * 9.0d0))) - 1.0d0)
end function
public static double code(double x, double y) {
return (3.0 * Math.sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0);
}
def code(x, y): return (3.0 * math.sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0)
function code(x, y) return Float64(Float64(3.0 * sqrt(x)) * Float64(Float64(y + Float64(1.0 / Float64(x * 9.0))) - 1.0)) end
function tmp = code(x, y) tmp = (3.0 * sqrt(x)) * ((y + (1.0 / (x * 9.0))) - 1.0); end
code[x_, y_] := N[(N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[(N[(y + N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(3 \cdot \sqrt{x}\right) \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) - 1\right)
\end{array}
(FPCore (x y) :precision binary64 (* (sqrt (* x 9.0)) (+ (+ y (/ 1.0 (* x 9.0))) -1.0)))
double code(double x, double y) {
return sqrt((x * 9.0)) * ((y + (1.0 / (x * 9.0))) + -1.0);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sqrt((x * 9.0d0)) * ((y + (1.0d0 / (x * 9.0d0))) + (-1.0d0))
end function
public static double code(double x, double y) {
return Math.sqrt((x * 9.0)) * ((y + (1.0 / (x * 9.0))) + -1.0);
}
def code(x, y): return math.sqrt((x * 9.0)) * ((y + (1.0 / (x * 9.0))) + -1.0)
function code(x, y) return Float64(sqrt(Float64(x * 9.0)) * Float64(Float64(y + Float64(1.0 / Float64(x * 9.0))) + -1.0)) end
function tmp = code(x, y) tmp = sqrt((x * 9.0)) * ((y + (1.0 / (x * 9.0))) + -1.0); end
code[x_, y_] := N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * N[(N[(y + N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{x \cdot 9} \cdot \left(\left(y + \frac{1}{x \cdot 9}\right) + -1\right)
\end{array}
Initial program 99.3%
*-commutative99.3%
metadata-eval99.3%
sqrt-prod99.5%
pow199.5%
Applied egg-rr99.5%
unpow199.5%
Simplified99.5%
Final simplification99.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (sqrt x) (* y 3.0))))
(if (<= x 2.9e-66)
(pow (* x 9.0) -0.5)
(if (<= x 3.3e-21)
t_0
(if (<= x 1.5e-11)
(* (sqrt x) (/ 0.3333333333333333 x))
(if (<= x 1.6e+15)
t_0
(if (or (<= x 6.8e+47) (not (<= x 1.7e+178)))
(* (sqrt x) -3.0)
(* (sqrt (* x 9.0)) y))))))))
double code(double x, double y) {
double t_0 = sqrt(x) * (y * 3.0);
double tmp;
if (x <= 2.9e-66) {
tmp = pow((x * 9.0), -0.5);
} else if (x <= 3.3e-21) {
tmp = t_0;
} else if (x <= 1.5e-11) {
tmp = sqrt(x) * (0.3333333333333333 / x);
} else if (x <= 1.6e+15) {
tmp = t_0;
} else if ((x <= 6.8e+47) || !(x <= 1.7e+178)) {
tmp = sqrt(x) * -3.0;
} else {
tmp = sqrt((x * 9.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 = sqrt(x) * (y * 3.0d0)
if (x <= 2.9d-66) then
tmp = (x * 9.0d0) ** (-0.5d0)
else if (x <= 3.3d-21) then
tmp = t_0
else if (x <= 1.5d-11) then
tmp = sqrt(x) * (0.3333333333333333d0 / x)
else if (x <= 1.6d+15) then
tmp = t_0
else if ((x <= 6.8d+47) .or. (.not. (x <= 1.7d+178))) then
tmp = sqrt(x) * (-3.0d0)
else
tmp = sqrt((x * 9.0d0)) * y
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sqrt(x) * (y * 3.0);
double tmp;
if (x <= 2.9e-66) {
tmp = Math.pow((x * 9.0), -0.5);
} else if (x <= 3.3e-21) {
tmp = t_0;
} else if (x <= 1.5e-11) {
tmp = Math.sqrt(x) * (0.3333333333333333 / x);
} else if (x <= 1.6e+15) {
tmp = t_0;
} else if ((x <= 6.8e+47) || !(x <= 1.7e+178)) {
tmp = Math.sqrt(x) * -3.0;
} else {
tmp = Math.sqrt((x * 9.0)) * y;
}
return tmp;
}
def code(x, y): t_0 = math.sqrt(x) * (y * 3.0) tmp = 0 if x <= 2.9e-66: tmp = math.pow((x * 9.0), -0.5) elif x <= 3.3e-21: tmp = t_0 elif x <= 1.5e-11: tmp = math.sqrt(x) * (0.3333333333333333 / x) elif x <= 1.6e+15: tmp = t_0 elif (x <= 6.8e+47) or not (x <= 1.7e+178): tmp = math.sqrt(x) * -3.0 else: tmp = math.sqrt((x * 9.0)) * y return tmp
function code(x, y) t_0 = Float64(sqrt(x) * Float64(y * 3.0)) tmp = 0.0 if (x <= 2.9e-66) tmp = Float64(x * 9.0) ^ -0.5; elseif (x <= 3.3e-21) tmp = t_0; elseif (x <= 1.5e-11) tmp = Float64(sqrt(x) * Float64(0.3333333333333333 / x)); elseif (x <= 1.6e+15) tmp = t_0; elseif ((x <= 6.8e+47) || !(x <= 1.7e+178)) tmp = Float64(sqrt(x) * -3.0); else tmp = Float64(sqrt(Float64(x * 9.0)) * y); end return tmp end
function tmp_2 = code(x, y) t_0 = sqrt(x) * (y * 3.0); tmp = 0.0; if (x <= 2.9e-66) tmp = (x * 9.0) ^ -0.5; elseif (x <= 3.3e-21) tmp = t_0; elseif (x <= 1.5e-11) tmp = sqrt(x) * (0.3333333333333333 / x); elseif (x <= 1.6e+15) tmp = t_0; elseif ((x <= 6.8e+47) || ~((x <= 1.7e+178))) tmp = sqrt(x) * -3.0; else tmp = sqrt((x * 9.0)) * y; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 2.9e-66], N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision], If[LessEqual[x, 3.3e-21], t$95$0, If[LessEqual[x, 1.5e-11], N[(N[Sqrt[x], $MachinePrecision] * N[(0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.6e+15], t$95$0, If[Or[LessEqual[x, 6.8e+47], N[Not[LessEqual[x, 1.7e+178]], $MachinePrecision]], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{x} \cdot \left(y \cdot 3\right)\\
\mathbf{if}\;x \leq 2.9 \cdot 10^{-66}:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{-21}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{-11}:\\
\;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333}{x}\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+15}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 6.8 \cdot 10^{+47} \lor \neg \left(x \leq 1.7 \cdot 10^{+178}\right):\\
\;\;\;\;\sqrt{x} \cdot -3\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x \cdot 9} \cdot y\\
\end{array}
\end{array}
if x < 2.90000000000000011e-66Initial program 99.2%
*-commutative99.2%
associate-*l*99.1%
associate--l+99.1%
distribute-lft-in99.1%
fma-define99.2%
sub-neg99.2%
+-commutative99.2%
distribute-lft-in99.2%
metadata-eval99.2%
metadata-eval99.2%
*-commutative99.2%
associate-/r*99.2%
associate-*r/99.2%
metadata-eval99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around 0 83.4%
metadata-eval83.4%
sqrt-prod83.6%
metadata-eval83.6%
inv-pow83.6%
unpow-prod-down83.8%
*-commutative83.8%
sqrt-pow183.7%
metadata-eval83.7%
Applied egg-rr83.7%
if 2.90000000000000011e-66 < x < 3.30000000000000009e-21 or 1.5e-11 < x < 1.6e15Initial program 99.4%
sub-neg99.4%
+-commutative99.4%
associate-+l+99.4%
*-commutative99.4%
associate-/r*99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
*-commutative99.4%
metadata-eval99.4%
sqrt-prod99.2%
pow199.2%
Applied egg-rr99.1%
unpow199.2%
Simplified99.1%
add-sqr-sqrt98.9%
pow298.9%
pow1/298.9%
sqrt-pow199.1%
metadata-eval99.1%
Applied egg-rr99.1%
Taylor expanded in y around inf 68.8%
associate-*r*68.9%
*-commutative68.9%
associate-*r*68.9%
Simplified68.9%
if 3.30000000000000009e-21 < x < 1.5e-11Initial program 98.8%
*-commutative98.8%
associate-*l*98.8%
associate--l+98.8%
distribute-lft-in98.8%
fma-define98.8%
sub-neg98.8%
+-commutative98.8%
distribute-lft-in98.8%
metadata-eval98.8%
metadata-eval98.8%
*-commutative98.8%
associate-/r*99.3%
associate-*r/99.1%
metadata-eval99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in x around 0 76.2%
if 1.6e15 < x < 6.7999999999999996e47 or 1.7000000000000001e178 < x Initial program 99.5%
sub-neg99.5%
+-commutative99.5%
associate-+l+99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 70.0%
associate-*r*70.0%
*-commutative70.0%
sub-neg70.0%
associate-*r/70.0%
metadata-eval70.0%
metadata-eval70.0%
associate-*l*70.0%
+-commutative70.0%
Simplified70.0%
Taylor expanded in x around inf 70.0%
*-commutative70.0%
Simplified70.0%
if 6.7999999999999996e47 < x < 1.7000000000000001e178Initial program 99.4%
sub-neg99.4%
+-commutative99.4%
associate-+l+99.4%
*-commutative99.4%
associate-/r*99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 67.9%
*-commutative99.4%
metadata-eval99.4%
sqrt-prod99.7%
pow199.7%
Applied egg-rr68.0%
unpow199.7%
Simplified68.0%
Final simplification75.5%
(FPCore (x y)
:precision binary64
(if (<= x 2.1e-65)
(pow (* x 9.0) -0.5)
(if (<= x 2.3e-21)
(* (sqrt x) (* y 3.0))
(if (<= x 7.8e-8)
(* (sqrt x) (/ 0.3333333333333333 x))
(if (<= x 7.6e+15)
(* y (* (sqrt x) 3.0))
(if (or (<= x 1.45e+48) (not (<= x 1.8e+178)))
(* (sqrt x) -3.0)
(* (sqrt (* x 9.0)) y)))))))
double code(double x, double y) {
double tmp;
if (x <= 2.1e-65) {
tmp = pow((x * 9.0), -0.5);
} else if (x <= 2.3e-21) {
tmp = sqrt(x) * (y * 3.0);
} else if (x <= 7.8e-8) {
tmp = sqrt(x) * (0.3333333333333333 / x);
} else if (x <= 7.6e+15) {
tmp = y * (sqrt(x) * 3.0);
} else if ((x <= 1.45e+48) || !(x <= 1.8e+178)) {
tmp = sqrt(x) * -3.0;
} else {
tmp = sqrt((x * 9.0)) * 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.1d-65) then
tmp = (x * 9.0d0) ** (-0.5d0)
else if (x <= 2.3d-21) then
tmp = sqrt(x) * (y * 3.0d0)
else if (x <= 7.8d-8) then
tmp = sqrt(x) * (0.3333333333333333d0 / x)
else if (x <= 7.6d+15) then
tmp = y * (sqrt(x) * 3.0d0)
else if ((x <= 1.45d+48) .or. (.not. (x <= 1.8d+178))) then
tmp = sqrt(x) * (-3.0d0)
else
tmp = sqrt((x * 9.0d0)) * y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 2.1e-65) {
tmp = Math.pow((x * 9.0), -0.5);
} else if (x <= 2.3e-21) {
tmp = Math.sqrt(x) * (y * 3.0);
} else if (x <= 7.8e-8) {
tmp = Math.sqrt(x) * (0.3333333333333333 / x);
} else if (x <= 7.6e+15) {
tmp = y * (Math.sqrt(x) * 3.0);
} else if ((x <= 1.45e+48) || !(x <= 1.8e+178)) {
tmp = Math.sqrt(x) * -3.0;
} else {
tmp = Math.sqrt((x * 9.0)) * y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 2.1e-65: tmp = math.pow((x * 9.0), -0.5) elif x <= 2.3e-21: tmp = math.sqrt(x) * (y * 3.0) elif x <= 7.8e-8: tmp = math.sqrt(x) * (0.3333333333333333 / x) elif x <= 7.6e+15: tmp = y * (math.sqrt(x) * 3.0) elif (x <= 1.45e+48) or not (x <= 1.8e+178): tmp = math.sqrt(x) * -3.0 else: tmp = math.sqrt((x * 9.0)) * y return tmp
function code(x, y) tmp = 0.0 if (x <= 2.1e-65) tmp = Float64(x * 9.0) ^ -0.5; elseif (x <= 2.3e-21) tmp = Float64(sqrt(x) * Float64(y * 3.0)); elseif (x <= 7.8e-8) tmp = Float64(sqrt(x) * Float64(0.3333333333333333 / x)); elseif (x <= 7.6e+15) tmp = Float64(y * Float64(sqrt(x) * 3.0)); elseif ((x <= 1.45e+48) || !(x <= 1.8e+178)) tmp = Float64(sqrt(x) * -3.0); else tmp = Float64(sqrt(Float64(x * 9.0)) * y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 2.1e-65) tmp = (x * 9.0) ^ -0.5; elseif (x <= 2.3e-21) tmp = sqrt(x) * (y * 3.0); elseif (x <= 7.8e-8) tmp = sqrt(x) * (0.3333333333333333 / x); elseif (x <= 7.6e+15) tmp = y * (sqrt(x) * 3.0); elseif ((x <= 1.45e+48) || ~((x <= 1.8e+178))) tmp = sqrt(x) * -3.0; else tmp = sqrt((x * 9.0)) * y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 2.1e-65], N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision], If[LessEqual[x, 2.3e-21], N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.8e-8], N[(N[Sqrt[x], $MachinePrecision] * N[(0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.6e+15], N[(y * N[(N[Sqrt[x], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 1.45e+48], N[Not[LessEqual[x, 1.8e+178]], $MachinePrecision]], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.1 \cdot 10^{-65}:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{-21}:\\
\;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{-8}:\\
\;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333}{x}\\
\mathbf{elif}\;x \leq 7.6 \cdot 10^{+15}:\\
\;\;\;\;y \cdot \left(\sqrt{x} \cdot 3\right)\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{+48} \lor \neg \left(x \leq 1.8 \cdot 10^{+178}\right):\\
\;\;\;\;\sqrt{x} \cdot -3\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x \cdot 9} \cdot y\\
\end{array}
\end{array}
if x < 2.10000000000000003e-65Initial program 99.2%
*-commutative99.2%
associate-*l*99.1%
associate--l+99.1%
distribute-lft-in99.1%
fma-define99.2%
sub-neg99.2%
+-commutative99.2%
distribute-lft-in99.2%
metadata-eval99.2%
metadata-eval99.2%
*-commutative99.2%
associate-/r*99.2%
associate-*r/99.2%
metadata-eval99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around 0 83.4%
metadata-eval83.4%
sqrt-prod83.6%
metadata-eval83.6%
inv-pow83.6%
unpow-prod-down83.8%
*-commutative83.8%
sqrt-pow183.7%
metadata-eval83.7%
Applied egg-rr83.7%
if 2.10000000000000003e-65 < x < 2.29999999999999999e-21Initial program 99.2%
*-commutative99.2%
associate-*l*99.4%
associate--l+99.4%
distribute-lft-in99.5%
fma-define99.4%
sub-neg99.4%
+-commutative99.4%
distribute-lft-in99.4%
metadata-eval99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.6%
associate-*r/99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 61.7%
*-commutative61.7%
associate-*l*61.7%
*-commutative61.7%
Simplified61.7%
if 2.29999999999999999e-21 < x < 7.7999999999999997e-8Initial program 98.8%
*-commutative98.8%
associate-*l*98.8%
associate--l+98.8%
distribute-lft-in98.8%
fma-define98.8%
sub-neg98.8%
+-commutative98.8%
distribute-lft-in98.8%
metadata-eval98.8%
metadata-eval98.8%
*-commutative98.8%
associate-/r*99.3%
associate-*r/99.1%
metadata-eval99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in x around 0 76.2%
if 7.7999999999999997e-8 < x < 7.6e15Initial program 99.5%
sub-neg99.5%
+-commutative99.5%
associate-+l+99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 77.8%
if 7.6e15 < x < 1.4499999999999999e48 or 1.7999999999999999e178 < x Initial program 99.5%
sub-neg99.5%
+-commutative99.5%
associate-+l+99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 70.0%
associate-*r*70.0%
*-commutative70.0%
sub-neg70.0%
associate-*r/70.0%
metadata-eval70.0%
metadata-eval70.0%
associate-*l*70.0%
+-commutative70.0%
Simplified70.0%
Taylor expanded in x around inf 70.0%
*-commutative70.0%
Simplified70.0%
if 1.4499999999999999e48 < x < 1.7999999999999999e178Initial program 99.4%
sub-neg99.4%
+-commutative99.4%
associate-+l+99.4%
*-commutative99.4%
associate-/r*99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 67.9%
*-commutative99.4%
metadata-eval99.4%
sqrt-prod99.7%
pow199.7%
Applied egg-rr68.0%
unpow199.7%
Simplified68.0%
Final simplification75.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (sqrt x) (* y 3.0))))
(if (<= x 7.5e-66)
(pow (* x 9.0) -0.5)
(if (<= x 3.5e-21)
t_0
(if (<= x 8.6e-11)
(* (sqrt x) (/ 0.3333333333333333 x))
(if (<= x 9e+16)
t_0
(if (or (<= x 1.15e+48) (not (<= x 1.85e+178)))
(* (sqrt x) -3.0)
(* (sqrt (* x 9.0)) y))))))))
double code(double x, double y) {
double t_0 = sqrt(x) * (y * 3.0);
double tmp;
if (x <= 7.5e-66) {
tmp = pow((x * 9.0), -0.5);
} else if (x <= 3.5e-21) {
tmp = t_0;
} else if (x <= 8.6e-11) {
tmp = sqrt(x) * (0.3333333333333333 / x);
} else if (x <= 9e+16) {
tmp = t_0;
} else if ((x <= 1.15e+48) || !(x <= 1.85e+178)) {
tmp = sqrt(x) * -3.0;
} else {
tmp = sqrt((x * 9.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 = sqrt(x) * (y * 3.0d0)
if (x <= 7.5d-66) then
tmp = (x * 9.0d0) ** (-0.5d0)
else if (x <= 3.5d-21) then
tmp = t_0
else if (x <= 8.6d-11) then
tmp = sqrt(x) * (0.3333333333333333d0 / x)
else if (x <= 9d+16) then
tmp = t_0
else if ((x <= 1.15d+48) .or. (.not. (x <= 1.85d+178))) then
tmp = sqrt(x) * (-3.0d0)
else
tmp = sqrt((x * 9.0d0)) * y
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sqrt(x) * (y * 3.0);
double tmp;
if (x <= 7.5e-66) {
tmp = Math.pow((x * 9.0), -0.5);
} else if (x <= 3.5e-21) {
tmp = t_0;
} else if (x <= 8.6e-11) {
tmp = Math.sqrt(x) * (0.3333333333333333 / x);
} else if (x <= 9e+16) {
tmp = t_0;
} else if ((x <= 1.15e+48) || !(x <= 1.85e+178)) {
tmp = Math.sqrt(x) * -3.0;
} else {
tmp = Math.sqrt((x * 9.0)) * y;
}
return tmp;
}
def code(x, y): t_0 = math.sqrt(x) * (y * 3.0) tmp = 0 if x <= 7.5e-66: tmp = math.pow((x * 9.0), -0.5) elif x <= 3.5e-21: tmp = t_0 elif x <= 8.6e-11: tmp = math.sqrt(x) * (0.3333333333333333 / x) elif x <= 9e+16: tmp = t_0 elif (x <= 1.15e+48) or not (x <= 1.85e+178): tmp = math.sqrt(x) * -3.0 else: tmp = math.sqrt((x * 9.0)) * y return tmp
function code(x, y) t_0 = Float64(sqrt(x) * Float64(y * 3.0)) tmp = 0.0 if (x <= 7.5e-66) tmp = Float64(x * 9.0) ^ -0.5; elseif (x <= 3.5e-21) tmp = t_0; elseif (x <= 8.6e-11) tmp = Float64(sqrt(x) * Float64(0.3333333333333333 / x)); elseif (x <= 9e+16) tmp = t_0; elseif ((x <= 1.15e+48) || !(x <= 1.85e+178)) tmp = Float64(sqrt(x) * -3.0); else tmp = Float64(sqrt(Float64(x * 9.0)) * y); end return tmp end
function tmp_2 = code(x, y) t_0 = sqrt(x) * (y * 3.0); tmp = 0.0; if (x <= 7.5e-66) tmp = (x * 9.0) ^ -0.5; elseif (x <= 3.5e-21) tmp = t_0; elseif (x <= 8.6e-11) tmp = sqrt(x) * (0.3333333333333333 / x); elseif (x <= 9e+16) tmp = t_0; elseif ((x <= 1.15e+48) || ~((x <= 1.85e+178))) tmp = sqrt(x) * -3.0; else tmp = sqrt((x * 9.0)) * y; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 7.5e-66], N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision], If[LessEqual[x, 3.5e-21], t$95$0, If[LessEqual[x, 8.6e-11], N[(N[Sqrt[x], $MachinePrecision] * N[(0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9e+16], t$95$0, If[Or[LessEqual[x, 1.15e+48], N[Not[LessEqual[x, 1.85e+178]], $MachinePrecision]], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * y), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{x} \cdot \left(y \cdot 3\right)\\
\mathbf{if}\;x \leq 7.5 \cdot 10^{-66}:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-21}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 8.6 \cdot 10^{-11}:\\
\;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333}{x}\\
\mathbf{elif}\;x \leq 9 \cdot 10^{+16}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{+48} \lor \neg \left(x \leq 1.85 \cdot 10^{+178}\right):\\
\;\;\;\;\sqrt{x} \cdot -3\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x \cdot 9} \cdot y\\
\end{array}
\end{array}
if x < 7.49999999999999995e-66Initial program 99.2%
*-commutative99.2%
associate-*l*99.1%
associate--l+99.1%
distribute-lft-in99.1%
fma-define99.2%
sub-neg99.2%
+-commutative99.2%
distribute-lft-in99.2%
metadata-eval99.2%
metadata-eval99.2%
*-commutative99.2%
associate-/r*99.2%
associate-*r/99.2%
metadata-eval99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around 0 83.4%
metadata-eval83.4%
sqrt-prod83.6%
metadata-eval83.6%
inv-pow83.6%
unpow-prod-down83.8%
*-commutative83.8%
sqrt-pow183.7%
metadata-eval83.7%
Applied egg-rr83.7%
if 7.49999999999999995e-66 < x < 3.5000000000000003e-21 or 8.60000000000000003e-11 < x < 9e16Initial program 99.4%
*-commutative99.4%
associate-*l*99.5%
associate--l+99.5%
distribute-lft-in99.5%
fma-define99.5%
sub-neg99.5%
+-commutative99.5%
distribute-lft-in99.4%
metadata-eval99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.5%
associate-*r/99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 68.8%
*-commutative68.8%
associate-*l*68.9%
*-commutative68.9%
Simplified68.9%
if 3.5000000000000003e-21 < x < 8.60000000000000003e-11Initial program 98.8%
*-commutative98.8%
associate-*l*98.8%
associate--l+98.8%
distribute-lft-in98.8%
fma-define98.8%
sub-neg98.8%
+-commutative98.8%
distribute-lft-in98.8%
metadata-eval98.8%
metadata-eval98.8%
*-commutative98.8%
associate-/r*99.3%
associate-*r/99.1%
metadata-eval99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in x around 0 76.2%
if 9e16 < x < 1.15e48 or 1.8500000000000001e178 < x Initial program 99.5%
sub-neg99.5%
+-commutative99.5%
associate-+l+99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 70.0%
associate-*r*70.0%
*-commutative70.0%
sub-neg70.0%
associate-*r/70.0%
metadata-eval70.0%
metadata-eval70.0%
associate-*l*70.0%
+-commutative70.0%
Simplified70.0%
Taylor expanded in x around inf 70.0%
*-commutative70.0%
Simplified70.0%
if 1.15e48 < x < 1.8500000000000001e178Initial program 99.4%
sub-neg99.4%
+-commutative99.4%
associate-+l+99.4%
*-commutative99.4%
associate-/r*99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 67.9%
*-commutative99.4%
metadata-eval99.4%
sqrt-prod99.7%
pow199.7%
Applied egg-rr68.0%
unpow199.7%
Simplified68.0%
Final simplification75.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (sqrt x) (* y 3.0))))
(if (<= x 1.85e-65)
(pow (* x 9.0) -0.5)
(if (<= x 2e-21)
t_0
(if (<= x 1.32e-11)
(* (sqrt x) (/ 0.3333333333333333 x))
(if (or (<= x 3e+16) (and (not (<= x 1.22e+48)) (<= x 2.15e+178)))
t_0
(* (sqrt x) -3.0)))))))
double code(double x, double y) {
double t_0 = sqrt(x) * (y * 3.0);
double tmp;
if (x <= 1.85e-65) {
tmp = pow((x * 9.0), -0.5);
} else if (x <= 2e-21) {
tmp = t_0;
} else if (x <= 1.32e-11) {
tmp = sqrt(x) * (0.3333333333333333 / x);
} else if ((x <= 3e+16) || (!(x <= 1.22e+48) && (x <= 2.15e+178))) {
tmp = t_0;
} else {
tmp = sqrt(x) * -3.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 = sqrt(x) * (y * 3.0d0)
if (x <= 1.85d-65) then
tmp = (x * 9.0d0) ** (-0.5d0)
else if (x <= 2d-21) then
tmp = t_0
else if (x <= 1.32d-11) then
tmp = sqrt(x) * (0.3333333333333333d0 / x)
else if ((x <= 3d+16) .or. (.not. (x <= 1.22d+48)) .and. (x <= 2.15d+178)) then
tmp = t_0
else
tmp = sqrt(x) * (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sqrt(x) * (y * 3.0);
double tmp;
if (x <= 1.85e-65) {
tmp = Math.pow((x * 9.0), -0.5);
} else if (x <= 2e-21) {
tmp = t_0;
} else if (x <= 1.32e-11) {
tmp = Math.sqrt(x) * (0.3333333333333333 / x);
} else if ((x <= 3e+16) || (!(x <= 1.22e+48) && (x <= 2.15e+178))) {
tmp = t_0;
} else {
tmp = Math.sqrt(x) * -3.0;
}
return tmp;
}
def code(x, y): t_0 = math.sqrt(x) * (y * 3.0) tmp = 0 if x <= 1.85e-65: tmp = math.pow((x * 9.0), -0.5) elif x <= 2e-21: tmp = t_0 elif x <= 1.32e-11: tmp = math.sqrt(x) * (0.3333333333333333 / x) elif (x <= 3e+16) or (not (x <= 1.22e+48) and (x <= 2.15e+178)): tmp = t_0 else: tmp = math.sqrt(x) * -3.0 return tmp
function code(x, y) t_0 = Float64(sqrt(x) * Float64(y * 3.0)) tmp = 0.0 if (x <= 1.85e-65) tmp = Float64(x * 9.0) ^ -0.5; elseif (x <= 2e-21) tmp = t_0; elseif (x <= 1.32e-11) tmp = Float64(sqrt(x) * Float64(0.3333333333333333 / x)); elseif ((x <= 3e+16) || (!(x <= 1.22e+48) && (x <= 2.15e+178))) tmp = t_0; else tmp = Float64(sqrt(x) * -3.0); end return tmp end
function tmp_2 = code(x, y) t_0 = sqrt(x) * (y * 3.0); tmp = 0.0; if (x <= 1.85e-65) tmp = (x * 9.0) ^ -0.5; elseif (x <= 2e-21) tmp = t_0; elseif (x <= 1.32e-11) tmp = sqrt(x) * (0.3333333333333333 / x); elseif ((x <= 3e+16) || (~((x <= 1.22e+48)) && (x <= 2.15e+178))) tmp = t_0; else tmp = sqrt(x) * -3.0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 1.85e-65], N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision], If[LessEqual[x, 2e-21], t$95$0, If[LessEqual[x, 1.32e-11], N[(N[Sqrt[x], $MachinePrecision] * N[(0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 3e+16], And[N[Not[LessEqual[x, 1.22e+48]], $MachinePrecision], LessEqual[x, 2.15e+178]]], t$95$0, N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{x} \cdot \left(y \cdot 3\right)\\
\mathbf{if}\;x \leq 1.85 \cdot 10^{-65}:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\
\mathbf{elif}\;x \leq 2 \cdot 10^{-21}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.32 \cdot 10^{-11}:\\
\;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333}{x}\\
\mathbf{elif}\;x \leq 3 \cdot 10^{+16} \lor \neg \left(x \leq 1.22 \cdot 10^{+48}\right) \land x \leq 2.15 \cdot 10^{+178}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\end{array}
\end{array}
if x < 1.85e-65Initial program 99.2%
*-commutative99.2%
associate-*l*99.1%
associate--l+99.1%
distribute-lft-in99.1%
fma-define99.2%
sub-neg99.2%
+-commutative99.2%
distribute-lft-in99.2%
metadata-eval99.2%
metadata-eval99.2%
*-commutative99.2%
associate-/r*99.2%
associate-*r/99.2%
metadata-eval99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around 0 83.4%
metadata-eval83.4%
sqrt-prod83.6%
metadata-eval83.6%
inv-pow83.6%
unpow-prod-down83.8%
*-commutative83.8%
sqrt-pow183.7%
metadata-eval83.7%
Applied egg-rr83.7%
if 1.85e-65 < x < 1.99999999999999982e-21 or 1.32e-11 < x < 3e16 or 1.22000000000000004e48 < x < 2.1500000000000001e178Initial program 99.4%
*-commutative99.4%
associate-*l*99.5%
associate--l+99.5%
distribute-lft-in99.5%
fma-define99.5%
sub-neg99.5%
+-commutative99.5%
distribute-lft-in99.5%
metadata-eval99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
associate-*r/99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 68.2%
*-commutative68.2%
associate-*l*68.3%
*-commutative68.3%
Simplified68.3%
if 1.99999999999999982e-21 < x < 1.32e-11Initial program 98.8%
*-commutative98.8%
associate-*l*98.8%
associate--l+98.8%
distribute-lft-in98.8%
fma-define98.8%
sub-neg98.8%
+-commutative98.8%
distribute-lft-in98.8%
metadata-eval98.8%
metadata-eval98.8%
*-commutative98.8%
associate-/r*99.3%
associate-*r/99.1%
metadata-eval99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in x around 0 76.2%
if 3e16 < x < 1.22000000000000004e48 or 2.1500000000000001e178 < x Initial program 99.5%
sub-neg99.5%
+-commutative99.5%
associate-+l+99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 70.0%
associate-*r*70.0%
*-commutative70.0%
sub-neg70.0%
associate-*r/70.0%
metadata-eval70.0%
metadata-eval70.0%
associate-*l*70.0%
+-commutative70.0%
Simplified70.0%
Taylor expanded in x around inf 70.0%
*-commutative70.0%
Simplified70.0%
Final simplification75.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (sqrt x) (* y 3.0))))
(if (<= x 2.9e-66)
(pow (* x 9.0) -0.5)
(if (<= x 3.4e-21)
t_0
(if (<= x 1.45e-11)
(/ (pow x -0.5) 3.0)
(if (or (<= x 8e+16) (and (not (<= x 7.2e+47)) (<= x 1.9e+178)))
t_0
(* (sqrt x) -3.0)))))))
double code(double x, double y) {
double t_0 = sqrt(x) * (y * 3.0);
double tmp;
if (x <= 2.9e-66) {
tmp = pow((x * 9.0), -0.5);
} else if (x <= 3.4e-21) {
tmp = t_0;
} else if (x <= 1.45e-11) {
tmp = pow(x, -0.5) / 3.0;
} else if ((x <= 8e+16) || (!(x <= 7.2e+47) && (x <= 1.9e+178))) {
tmp = t_0;
} else {
tmp = sqrt(x) * -3.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 = sqrt(x) * (y * 3.0d0)
if (x <= 2.9d-66) then
tmp = (x * 9.0d0) ** (-0.5d0)
else if (x <= 3.4d-21) then
tmp = t_0
else if (x <= 1.45d-11) then
tmp = (x ** (-0.5d0)) / 3.0d0
else if ((x <= 8d+16) .or. (.not. (x <= 7.2d+47)) .and. (x <= 1.9d+178)) then
tmp = t_0
else
tmp = sqrt(x) * (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sqrt(x) * (y * 3.0);
double tmp;
if (x <= 2.9e-66) {
tmp = Math.pow((x * 9.0), -0.5);
} else if (x <= 3.4e-21) {
tmp = t_0;
} else if (x <= 1.45e-11) {
tmp = Math.pow(x, -0.5) / 3.0;
} else if ((x <= 8e+16) || (!(x <= 7.2e+47) && (x <= 1.9e+178))) {
tmp = t_0;
} else {
tmp = Math.sqrt(x) * -3.0;
}
return tmp;
}
def code(x, y): t_0 = math.sqrt(x) * (y * 3.0) tmp = 0 if x <= 2.9e-66: tmp = math.pow((x * 9.0), -0.5) elif x <= 3.4e-21: tmp = t_0 elif x <= 1.45e-11: tmp = math.pow(x, -0.5) / 3.0 elif (x <= 8e+16) or (not (x <= 7.2e+47) and (x <= 1.9e+178)): tmp = t_0 else: tmp = math.sqrt(x) * -3.0 return tmp
function code(x, y) t_0 = Float64(sqrt(x) * Float64(y * 3.0)) tmp = 0.0 if (x <= 2.9e-66) tmp = Float64(x * 9.0) ^ -0.5; elseif (x <= 3.4e-21) tmp = t_0; elseif (x <= 1.45e-11) tmp = Float64((x ^ -0.5) / 3.0); elseif ((x <= 8e+16) || (!(x <= 7.2e+47) && (x <= 1.9e+178))) tmp = t_0; else tmp = Float64(sqrt(x) * -3.0); end return tmp end
function tmp_2 = code(x, y) t_0 = sqrt(x) * (y * 3.0); tmp = 0.0; if (x <= 2.9e-66) tmp = (x * 9.0) ^ -0.5; elseif (x <= 3.4e-21) tmp = t_0; elseif (x <= 1.45e-11) tmp = (x ^ -0.5) / 3.0; elseif ((x <= 8e+16) || (~((x <= 7.2e+47)) && (x <= 1.9e+178))) tmp = t_0; else tmp = sqrt(x) * -3.0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 2.9e-66], N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision], If[LessEqual[x, 3.4e-21], t$95$0, If[LessEqual[x, 1.45e-11], N[(N[Power[x, -0.5], $MachinePrecision] / 3.0), $MachinePrecision], If[Or[LessEqual[x, 8e+16], And[N[Not[LessEqual[x, 7.2e+47]], $MachinePrecision], LessEqual[x, 1.9e+178]]], t$95$0, N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{x} \cdot \left(y \cdot 3\right)\\
\mathbf{if}\;x \leq 2.9 \cdot 10^{-66}:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{-21}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{-11}:\\
\;\;\;\;\frac{{x}^{-0.5}}{3}\\
\mathbf{elif}\;x \leq 8 \cdot 10^{+16} \lor \neg \left(x \leq 7.2 \cdot 10^{+47}\right) \land x \leq 1.9 \cdot 10^{+178}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\end{array}
\end{array}
if x < 2.90000000000000011e-66Initial program 99.2%
*-commutative99.2%
associate-*l*99.1%
associate--l+99.1%
distribute-lft-in99.1%
fma-define99.2%
sub-neg99.2%
+-commutative99.2%
distribute-lft-in99.2%
metadata-eval99.2%
metadata-eval99.2%
*-commutative99.2%
associate-/r*99.2%
associate-*r/99.2%
metadata-eval99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around 0 83.4%
metadata-eval83.4%
sqrt-prod83.6%
metadata-eval83.6%
inv-pow83.6%
unpow-prod-down83.8%
*-commutative83.8%
sqrt-pow183.7%
metadata-eval83.7%
Applied egg-rr83.7%
if 2.90000000000000011e-66 < x < 3.4e-21 or 1.45e-11 < x < 8e16 or 7.20000000000000015e47 < x < 1.89999999999999999e178Initial program 99.4%
*-commutative99.4%
associate-*l*99.5%
associate--l+99.5%
distribute-lft-in99.5%
fma-define99.5%
sub-neg99.5%
+-commutative99.5%
distribute-lft-in99.5%
metadata-eval99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
associate-*r/99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 68.2%
*-commutative68.2%
associate-*l*68.3%
*-commutative68.3%
Simplified68.3%
if 3.4e-21 < x < 1.45e-11Initial program 98.8%
*-commutative98.8%
associate-*l*98.8%
associate--l+98.8%
distribute-lft-in98.8%
fma-define98.8%
sub-neg98.8%
+-commutative98.8%
distribute-lft-in98.8%
metadata-eval98.8%
metadata-eval98.8%
*-commutative98.8%
associate-/r*99.3%
associate-*r/99.1%
metadata-eval99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in x around 0 76.2%
metadata-eval76.2%
sqrt-prod76.2%
*-commutative76.2%
metadata-eval76.2%
div-inv76.4%
sqrt-div76.2%
inv-pow76.2%
sqrt-pow176.2%
metadata-eval76.2%
metadata-eval76.2%
Applied egg-rr76.2%
if 8e16 < x < 7.20000000000000015e47 or 1.89999999999999999e178 < x Initial program 99.5%
sub-neg99.5%
+-commutative99.5%
associate-+l+99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 70.0%
associate-*r*70.0%
*-commutative70.0%
sub-neg70.0%
associate-*r/70.0%
metadata-eval70.0%
metadata-eval70.0%
associate-*l*70.0%
+-commutative70.0%
Simplified70.0%
Taylor expanded in x around inf 70.0%
*-commutative70.0%
Simplified70.0%
Final simplification75.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 3.0 (* y (sqrt x)))))
(if (<= x 1.95e-65)
(pow (* x 9.0) -0.5)
(if (<= x 3.8e-21)
t_0
(if (<= x 2.7e-11)
(/ (pow x -0.5) 3.0)
(if (or (<= x 1.4e+16) (and (not (<= x 7.8e+47)) (<= x 1.8e+178)))
t_0
(* (sqrt x) -3.0)))))))
double code(double x, double y) {
double t_0 = 3.0 * (y * sqrt(x));
double tmp;
if (x <= 1.95e-65) {
tmp = pow((x * 9.0), -0.5);
} else if (x <= 3.8e-21) {
tmp = t_0;
} else if (x <= 2.7e-11) {
tmp = pow(x, -0.5) / 3.0;
} else if ((x <= 1.4e+16) || (!(x <= 7.8e+47) && (x <= 1.8e+178))) {
tmp = t_0;
} else {
tmp = sqrt(x) * -3.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 = 3.0d0 * (y * sqrt(x))
if (x <= 1.95d-65) then
tmp = (x * 9.0d0) ** (-0.5d0)
else if (x <= 3.8d-21) then
tmp = t_0
else if (x <= 2.7d-11) then
tmp = (x ** (-0.5d0)) / 3.0d0
else if ((x <= 1.4d+16) .or. (.not. (x <= 7.8d+47)) .and. (x <= 1.8d+178)) then
tmp = t_0
else
tmp = sqrt(x) * (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 3.0 * (y * Math.sqrt(x));
double tmp;
if (x <= 1.95e-65) {
tmp = Math.pow((x * 9.0), -0.5);
} else if (x <= 3.8e-21) {
tmp = t_0;
} else if (x <= 2.7e-11) {
tmp = Math.pow(x, -0.5) / 3.0;
} else if ((x <= 1.4e+16) || (!(x <= 7.8e+47) && (x <= 1.8e+178))) {
tmp = t_0;
} else {
tmp = Math.sqrt(x) * -3.0;
}
return tmp;
}
def code(x, y): t_0 = 3.0 * (y * math.sqrt(x)) tmp = 0 if x <= 1.95e-65: tmp = math.pow((x * 9.0), -0.5) elif x <= 3.8e-21: tmp = t_0 elif x <= 2.7e-11: tmp = math.pow(x, -0.5) / 3.0 elif (x <= 1.4e+16) or (not (x <= 7.8e+47) and (x <= 1.8e+178)): tmp = t_0 else: tmp = math.sqrt(x) * -3.0 return tmp
function code(x, y) t_0 = Float64(3.0 * Float64(y * sqrt(x))) tmp = 0.0 if (x <= 1.95e-65) tmp = Float64(x * 9.0) ^ -0.5; elseif (x <= 3.8e-21) tmp = t_0; elseif (x <= 2.7e-11) tmp = Float64((x ^ -0.5) / 3.0); elseif ((x <= 1.4e+16) || (!(x <= 7.8e+47) && (x <= 1.8e+178))) tmp = t_0; else tmp = Float64(sqrt(x) * -3.0); end return tmp end
function tmp_2 = code(x, y) t_0 = 3.0 * (y * sqrt(x)); tmp = 0.0; if (x <= 1.95e-65) tmp = (x * 9.0) ^ -0.5; elseif (x <= 3.8e-21) tmp = t_0; elseif (x <= 2.7e-11) tmp = (x ^ -0.5) / 3.0; elseif ((x <= 1.4e+16) || (~((x <= 7.8e+47)) && (x <= 1.8e+178))) tmp = t_0; else tmp = sqrt(x) * -3.0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(3.0 * N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 1.95e-65], N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision], If[LessEqual[x, 3.8e-21], t$95$0, If[LessEqual[x, 2.7e-11], N[(N[Power[x, -0.5], $MachinePrecision] / 3.0), $MachinePrecision], If[Or[LessEqual[x, 1.4e+16], And[N[Not[LessEqual[x, 7.8e+47]], $MachinePrecision], LessEqual[x, 1.8e+178]]], t$95$0, N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 \cdot \left(y \cdot \sqrt{x}\right)\\
\mathbf{if}\;x \leq 1.95 \cdot 10^{-65}:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{-21}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{-11}:\\
\;\;\;\;\frac{{x}^{-0.5}}{3}\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{+16} \lor \neg \left(x \leq 7.8 \cdot 10^{+47}\right) \land x \leq 1.8 \cdot 10^{+178}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\end{array}
\end{array}
if x < 1.9500000000000002e-65Initial program 99.2%
*-commutative99.2%
associate-*l*99.1%
associate--l+99.1%
distribute-lft-in99.1%
fma-define99.2%
sub-neg99.2%
+-commutative99.2%
distribute-lft-in99.2%
metadata-eval99.2%
metadata-eval99.2%
*-commutative99.2%
associate-/r*99.2%
associate-*r/99.2%
metadata-eval99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around 0 83.4%
metadata-eval83.4%
sqrt-prod83.6%
metadata-eval83.6%
inv-pow83.6%
unpow-prod-down83.8%
*-commutative83.8%
sqrt-pow183.7%
metadata-eval83.7%
Applied egg-rr83.7%
if 1.9500000000000002e-65 < x < 3.7999999999999998e-21 or 2.70000000000000005e-11 < x < 1.4e16 or 7.8000000000000005e47 < x < 1.7999999999999999e178Initial program 99.4%
*-commutative99.4%
associate-*l*99.5%
associate--l+99.5%
distribute-lft-in99.5%
fma-define99.5%
sub-neg99.5%
+-commutative99.5%
distribute-lft-in99.5%
metadata-eval99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
associate-*r/99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 68.2%
if 3.7999999999999998e-21 < x < 2.70000000000000005e-11Initial program 98.8%
*-commutative98.8%
associate-*l*98.8%
associate--l+98.8%
distribute-lft-in98.8%
fma-define98.8%
sub-neg98.8%
+-commutative98.8%
distribute-lft-in98.8%
metadata-eval98.8%
metadata-eval98.8%
*-commutative98.8%
associate-/r*99.3%
associate-*r/99.1%
metadata-eval99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in x around 0 76.2%
metadata-eval76.2%
sqrt-prod76.2%
*-commutative76.2%
metadata-eval76.2%
div-inv76.4%
sqrt-div76.2%
inv-pow76.2%
sqrt-pow176.2%
metadata-eval76.2%
metadata-eval76.2%
Applied egg-rr76.2%
if 1.4e16 < x < 7.8000000000000005e47 or 1.7999999999999999e178 < x Initial program 99.5%
sub-neg99.5%
+-commutative99.5%
associate-+l+99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 70.0%
associate-*r*70.0%
*-commutative70.0%
sub-neg70.0%
associate-*r/70.0%
metadata-eval70.0%
metadata-eval70.0%
associate-*l*70.0%
+-commutative70.0%
Simplified70.0%
Taylor expanded in x around inf 70.0%
*-commutative70.0%
Simplified70.0%
Final simplification75.4%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (sqrt (* x 9.0)) y)))
(if (<= y -1.75e+34)
t_0
(if (<= y 4.8e+31)
(* (sqrt x) (+ (/ 0.3333333333333333 x) -3.0))
(if (<= y 8e+78)
(* (sqrt x) (* y 3.0))
(if (<= y 4.5e+99) (/ (pow x -0.5) 3.0) t_0))))))
double code(double x, double y) {
double t_0 = sqrt((x * 9.0)) * y;
double tmp;
if (y <= -1.75e+34) {
tmp = t_0;
} else if (y <= 4.8e+31) {
tmp = sqrt(x) * ((0.3333333333333333 / x) + -3.0);
} else if (y <= 8e+78) {
tmp = sqrt(x) * (y * 3.0);
} else if (y <= 4.5e+99) {
tmp = pow(x, -0.5) / 3.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt((x * 9.0d0)) * y
if (y <= (-1.75d+34)) then
tmp = t_0
else if (y <= 4.8d+31) then
tmp = sqrt(x) * ((0.3333333333333333d0 / x) + (-3.0d0))
else if (y <= 8d+78) then
tmp = sqrt(x) * (y * 3.0d0)
else if (y <= 4.5d+99) then
tmp = (x ** (-0.5d0)) / 3.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sqrt((x * 9.0)) * y;
double tmp;
if (y <= -1.75e+34) {
tmp = t_0;
} else if (y <= 4.8e+31) {
tmp = Math.sqrt(x) * ((0.3333333333333333 / x) + -3.0);
} else if (y <= 8e+78) {
tmp = Math.sqrt(x) * (y * 3.0);
} else if (y <= 4.5e+99) {
tmp = Math.pow(x, -0.5) / 3.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = math.sqrt((x * 9.0)) * y tmp = 0 if y <= -1.75e+34: tmp = t_0 elif y <= 4.8e+31: tmp = math.sqrt(x) * ((0.3333333333333333 / x) + -3.0) elif y <= 8e+78: tmp = math.sqrt(x) * (y * 3.0) elif y <= 4.5e+99: tmp = math.pow(x, -0.5) / 3.0 else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(sqrt(Float64(x * 9.0)) * y) tmp = 0.0 if (y <= -1.75e+34) tmp = t_0; elseif (y <= 4.8e+31) tmp = Float64(sqrt(x) * Float64(Float64(0.3333333333333333 / x) + -3.0)); elseif (y <= 8e+78) tmp = Float64(sqrt(x) * Float64(y * 3.0)); elseif (y <= 4.5e+99) tmp = Float64((x ^ -0.5) / 3.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = sqrt((x * 9.0)) * y; tmp = 0.0; if (y <= -1.75e+34) tmp = t_0; elseif (y <= 4.8e+31) tmp = sqrt(x) * ((0.3333333333333333 / x) + -3.0); elseif (y <= 8e+78) tmp = sqrt(x) * (y * 3.0); elseif (y <= 4.5e+99) tmp = (x ^ -0.5) / 3.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -1.75e+34], t$95$0, If[LessEqual[y, 4.8e+31], N[(N[Sqrt[x], $MachinePrecision] * N[(N[(0.3333333333333333 / x), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e+78], N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+99], N[(N[Power[x, -0.5], $MachinePrecision] / 3.0), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{x \cdot 9} \cdot y\\
\mathbf{if}\;y \leq -1.75 \cdot 10^{+34}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+31}:\\
\;\;\;\;\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+78}:\\
\;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+99}:\\
\;\;\;\;\frac{{x}^{-0.5}}{3}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -1.74999999999999999e34 or 4.5e99 < y Initial program 99.5%
sub-neg99.5%
+-commutative99.5%
associate-+l+99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 80.7%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.6%
pow199.6%
Applied egg-rr80.7%
unpow199.6%
Simplified80.7%
if -1.74999999999999999e34 < y < 4.79999999999999965e31Initial program 99.3%
sub-neg99.3%
+-commutative99.3%
associate-+l+99.3%
*-commutative99.3%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in y around 0 96.5%
associate-*r*96.4%
*-commutative96.4%
sub-neg96.4%
associate-*r/96.5%
metadata-eval96.5%
metadata-eval96.5%
associate-*l*96.5%
+-commutative96.5%
Simplified96.5%
+-commutative96.5%
distribute-lft-in96.5%
associate-*r/96.6%
metadata-eval96.6%
metadata-eval96.6%
Applied egg-rr96.6%
if 4.79999999999999965e31 < y < 8.00000000000000007e78Initial program 99.3%
sub-neg99.3%
+-commutative99.3%
associate-+l+99.3%
*-commutative99.3%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
*-commutative99.3%
metadata-eval99.3%
sqrt-prod99.2%
pow199.2%
Applied egg-rr99.2%
unpow199.2%
Simplified99.2%
add-sqr-sqrt98.8%
pow298.8%
pow1/298.8%
sqrt-pow198.9%
metadata-eval98.9%
Applied egg-rr98.9%
Taylor expanded in y around inf 72.4%
associate-*r*72.5%
*-commutative72.5%
associate-*r*72.6%
Simplified72.6%
if 8.00000000000000007e78 < y < 4.5e99Initial program 99.1%
*-commutative99.1%
associate-*l*98.6%
associate--l+98.6%
distribute-lft-in98.6%
fma-define98.6%
sub-neg98.6%
+-commutative98.6%
distribute-lft-in98.6%
metadata-eval98.6%
metadata-eval98.6%
*-commutative98.6%
associate-/r*99.0%
associate-*r/98.9%
metadata-eval98.9%
metadata-eval98.9%
Simplified98.9%
Taylor expanded in x around 0 78.6%
metadata-eval78.6%
sqrt-prod78.8%
*-commutative78.8%
metadata-eval78.8%
div-inv78.8%
sqrt-div78.8%
inv-pow78.8%
sqrt-pow178.8%
metadata-eval78.8%
metadata-eval78.8%
Applied egg-rr78.8%
Final simplification88.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* (sqrt (* x 9.0)) y)))
(if (<= y -2.05e+36)
t_0
(if (<= y 2.9e+31)
(* (sqrt x) (+ (/ 0.3333333333333333 x) -3.0))
(if (<= y 2e+79)
(* (sqrt x) (* y 3.0))
(if (<= y 9.2e+98) (/ (pow x -0.5) 3.0) t_0))))))
double code(double x, double y) {
double t_0 = sqrt((x * 9.0)) * y;
double tmp;
if (y <= -2.05e+36) {
tmp = t_0;
} else if (y <= 2.9e+31) {
tmp = sqrt(x) * ((0.3333333333333333 / x) + -3.0);
} else if (y <= 2e+79) {
tmp = sqrt(x) * (y * 3.0);
} else if (y <= 9.2e+98) {
tmp = pow(x, -0.5) / 3.0;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt((x * 9.0d0)) * y
if (y <= (-2.05d+36)) then
tmp = t_0
else if (y <= 2.9d+31) then
tmp = sqrt(x) * ((0.3333333333333333d0 / x) + (-3.0d0))
else if (y <= 2d+79) then
tmp = sqrt(x) * (y * 3.0d0)
else if (y <= 9.2d+98) then
tmp = (x ** (-0.5d0)) / 3.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sqrt((x * 9.0)) * y;
double tmp;
if (y <= -2.05e+36) {
tmp = t_0;
} else if (y <= 2.9e+31) {
tmp = Math.sqrt(x) * ((0.3333333333333333 / x) + -3.0);
} else if (y <= 2e+79) {
tmp = Math.sqrt(x) * (y * 3.0);
} else if (y <= 9.2e+98) {
tmp = Math.pow(x, -0.5) / 3.0;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = math.sqrt((x * 9.0)) * y tmp = 0 if y <= -2.05e+36: tmp = t_0 elif y <= 2.9e+31: tmp = math.sqrt(x) * ((0.3333333333333333 / x) + -3.0) elif y <= 2e+79: tmp = math.sqrt(x) * (y * 3.0) elif y <= 9.2e+98: tmp = math.pow(x, -0.5) / 3.0 else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(sqrt(Float64(x * 9.0)) * y) tmp = 0.0 if (y <= -2.05e+36) tmp = t_0; elseif (y <= 2.9e+31) tmp = Float64(sqrt(x) * Float64(Float64(0.3333333333333333 / x) + -3.0)); elseif (y <= 2e+79) tmp = Float64(sqrt(x) * Float64(y * 3.0)); elseif (y <= 9.2e+98) tmp = Float64((x ^ -0.5) / 3.0); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = sqrt((x * 9.0)) * y; tmp = 0.0; if (y <= -2.05e+36) tmp = t_0; elseif (y <= 2.9e+31) tmp = sqrt(x) * ((0.3333333333333333 / x) + -3.0); elseif (y <= 2e+79) tmp = sqrt(x) * (y * 3.0); elseif (y <= 9.2e+98) tmp = (x ^ -0.5) / 3.0; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -2.05e+36], t$95$0, If[LessEqual[y, 2.9e+31], N[(N[Sqrt[x], $MachinePrecision] * N[(N[(0.3333333333333333 / x), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e+79], N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.2e+98], N[(N[Power[x, -0.5], $MachinePrecision] / 3.0), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{x \cdot 9} \cdot y\\
\mathbf{if}\;y \leq -2.05 \cdot 10^{+36}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+31}:\\
\;\;\;\;\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+79}:\\
\;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\
\mathbf{elif}\;y \leq 9.2 \cdot 10^{+98}:\\
\;\;\;\;\frac{{x}^{-0.5}}{3}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -2.05000000000000006e36 or 9.20000000000000053e98 < y Initial program 99.5%
sub-neg99.5%
+-commutative99.5%
associate-+l+99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 80.7%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.6%
pow199.6%
Applied egg-rr80.7%
unpow199.6%
Simplified80.7%
if -2.05000000000000006e36 < y < 2.9e31Initial program 99.3%
*-commutative99.3%
associate-*l*99.3%
associate--l+99.3%
distribute-lft-in99.3%
fma-define99.3%
sub-neg99.3%
+-commutative99.3%
distribute-lft-in99.3%
metadata-eval99.3%
metadata-eval99.3%
*-commutative99.3%
associate-/r*99.3%
associate-*r/99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around 0 96.5%
sub-neg96.5%
associate-*r/96.6%
metadata-eval96.6%
metadata-eval96.6%
+-commutative96.6%
Simplified96.6%
if 2.9e31 < y < 1.99999999999999993e79Initial program 99.3%
sub-neg99.3%
+-commutative99.3%
associate-+l+99.3%
*-commutative99.3%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
*-commutative99.3%
metadata-eval99.3%
sqrt-prod99.2%
pow199.2%
Applied egg-rr99.2%
unpow199.2%
Simplified99.2%
add-sqr-sqrt98.8%
pow298.8%
pow1/298.8%
sqrt-pow198.9%
metadata-eval98.9%
Applied egg-rr98.9%
Taylor expanded in y around inf 72.4%
associate-*r*72.5%
*-commutative72.5%
associate-*r*72.6%
Simplified72.6%
if 1.99999999999999993e79 < y < 9.20000000000000053e98Initial program 99.1%
*-commutative99.1%
associate-*l*98.6%
associate--l+98.6%
distribute-lft-in98.6%
fma-define98.6%
sub-neg98.6%
+-commutative98.6%
distribute-lft-in98.6%
metadata-eval98.6%
metadata-eval98.6%
*-commutative98.6%
associate-/r*99.0%
associate-*r/98.9%
metadata-eval98.9%
metadata-eval98.9%
Simplified98.9%
Taylor expanded in x around 0 78.6%
metadata-eval78.6%
sqrt-prod78.8%
*-commutative78.8%
metadata-eval78.8%
div-inv78.8%
sqrt-div78.8%
inv-pow78.8%
sqrt-pow178.8%
metadata-eval78.8%
metadata-eval78.8%
Applied egg-rr78.8%
Final simplification88.9%
(FPCore (x y)
:precision binary64
(if (<= x 2.1e-65)
(pow (* x 9.0) -0.5)
(if (<= x 2.5e-21)
(* (sqrt x) (* y 3.0))
(if (<= x 0.00023)
(* (sqrt x) (- (* 0.3333333333333333 (/ 1.0 x)) 3.0))
(* (sqrt (* x 9.0)) (+ y -1.0))))))
double code(double x, double y) {
double tmp;
if (x <= 2.1e-65) {
tmp = pow((x * 9.0), -0.5);
} else if (x <= 2.5e-21) {
tmp = sqrt(x) * (y * 3.0);
} else if (x <= 0.00023) {
tmp = sqrt(x) * ((0.3333333333333333 * (1.0 / x)) - 3.0);
} else {
tmp = sqrt((x * 9.0)) * (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 <= 2.1d-65) then
tmp = (x * 9.0d0) ** (-0.5d0)
else if (x <= 2.5d-21) then
tmp = sqrt(x) * (y * 3.0d0)
else if (x <= 0.00023d0) then
tmp = sqrt(x) * ((0.3333333333333333d0 * (1.0d0 / x)) - 3.0d0)
else
tmp = sqrt((x * 9.0d0)) * (y + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 2.1e-65) {
tmp = Math.pow((x * 9.0), -0.5);
} else if (x <= 2.5e-21) {
tmp = Math.sqrt(x) * (y * 3.0);
} else if (x <= 0.00023) {
tmp = Math.sqrt(x) * ((0.3333333333333333 * (1.0 / x)) - 3.0);
} else {
tmp = Math.sqrt((x * 9.0)) * (y + -1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 2.1e-65: tmp = math.pow((x * 9.0), -0.5) elif x <= 2.5e-21: tmp = math.sqrt(x) * (y * 3.0) elif x <= 0.00023: tmp = math.sqrt(x) * ((0.3333333333333333 * (1.0 / x)) - 3.0) else: tmp = math.sqrt((x * 9.0)) * (y + -1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= 2.1e-65) tmp = Float64(x * 9.0) ^ -0.5; elseif (x <= 2.5e-21) tmp = Float64(sqrt(x) * Float64(y * 3.0)); elseif (x <= 0.00023) tmp = Float64(sqrt(x) * Float64(Float64(0.3333333333333333 * Float64(1.0 / x)) - 3.0)); else tmp = Float64(sqrt(Float64(x * 9.0)) * Float64(y + -1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 2.1e-65) tmp = (x * 9.0) ^ -0.5; elseif (x <= 2.5e-21) tmp = sqrt(x) * (y * 3.0); elseif (x <= 0.00023) tmp = sqrt(x) * ((0.3333333333333333 * (1.0 / x)) - 3.0); else tmp = sqrt((x * 9.0)) * (y + -1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 2.1e-65], N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision], If[LessEqual[x, 2.5e-21], N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.00023], N[(N[Sqrt[x], $MachinePrecision] * N[(N[(0.3333333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.1 \cdot 10^{-65}:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{-21}:\\
\;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\
\mathbf{elif}\;x \leq 0.00023:\\
\;\;\;\;\sqrt{x} \cdot \left(0.3333333333333333 \cdot \frac{1}{x} - 3\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x \cdot 9} \cdot \left(y + -1\right)\\
\end{array}
\end{array}
if x < 2.10000000000000003e-65Initial program 99.2%
*-commutative99.2%
associate-*l*99.1%
associate--l+99.1%
distribute-lft-in99.1%
fma-define99.2%
sub-neg99.2%
+-commutative99.2%
distribute-lft-in99.2%
metadata-eval99.2%
metadata-eval99.2%
*-commutative99.2%
associate-/r*99.2%
associate-*r/99.2%
metadata-eval99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around 0 83.4%
metadata-eval83.4%
sqrt-prod83.6%
metadata-eval83.6%
inv-pow83.6%
unpow-prod-down83.8%
*-commutative83.8%
sqrt-pow183.7%
metadata-eval83.7%
Applied egg-rr83.7%
if 2.10000000000000003e-65 < x < 2.49999999999999986e-21Initial program 99.2%
sub-neg99.2%
+-commutative99.2%
associate-+l+99.2%
*-commutative99.2%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
*-commutative99.2%
metadata-eval99.2%
sqrt-prod99.3%
pow199.3%
Applied egg-rr99.1%
unpow199.3%
Simplified99.1%
add-sqr-sqrt98.9%
pow298.9%
pow1/298.9%
sqrt-pow199.2%
metadata-eval99.2%
Applied egg-rr99.2%
Taylor expanded in y around inf 61.7%
associate-*r*61.6%
*-commutative61.6%
associate-*r*61.7%
Simplified61.7%
if 2.49999999999999986e-21 < x < 2.3000000000000001e-4Initial program 98.8%
*-commutative98.8%
associate-*l*98.8%
associate--l+98.8%
distribute-lft-in98.8%
fma-define98.8%
sub-neg98.8%
+-commutative98.8%
distribute-lft-in98.8%
metadata-eval98.8%
metadata-eval98.8%
*-commutative98.8%
associate-/r*99.3%
associate-*r/99.1%
metadata-eval99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in y around 0 85.4%
if 2.3000000000000001e-4 < x Initial program 99.5%
sub-neg99.5%
+-commutative99.5%
associate-+l+99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.7%
pow199.7%
Applied egg-rr99.7%
unpow199.7%
Simplified99.7%
Taylor expanded in x around inf 98.6%
Final simplification89.6%
(FPCore (x y)
:precision binary64
(if (<= x 1.3e-65)
(pow (* x 9.0) -0.5)
(if (<= x 2.2e-21)
(* (sqrt x) (* y 3.0))
(if (<= x 1.65e-7)
(* (sqrt x) (* 3.0 (+ (/ 0.1111111111111111 x) -1.0)))
(* (sqrt (* x 9.0)) (+ y -1.0))))))
double code(double x, double y) {
double tmp;
if (x <= 1.3e-65) {
tmp = pow((x * 9.0), -0.5);
} else if (x <= 2.2e-21) {
tmp = sqrt(x) * (y * 3.0);
} else if (x <= 1.65e-7) {
tmp = sqrt(x) * (3.0 * ((0.1111111111111111 / x) + -1.0));
} else {
tmp = sqrt((x * 9.0)) * (y + -1.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 1.3d-65) then
tmp = (x * 9.0d0) ** (-0.5d0)
else if (x <= 2.2d-21) then
tmp = sqrt(x) * (y * 3.0d0)
else if (x <= 1.65d-7) then
tmp = sqrt(x) * (3.0d0 * ((0.1111111111111111d0 / x) + (-1.0d0)))
else
tmp = sqrt((x * 9.0d0)) * (y + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 1.3e-65) {
tmp = Math.pow((x * 9.0), -0.5);
} else if (x <= 2.2e-21) {
tmp = Math.sqrt(x) * (y * 3.0);
} else if (x <= 1.65e-7) {
tmp = Math.sqrt(x) * (3.0 * ((0.1111111111111111 / x) + -1.0));
} else {
tmp = Math.sqrt((x * 9.0)) * (y + -1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 1.3e-65: tmp = math.pow((x * 9.0), -0.5) elif x <= 2.2e-21: tmp = math.sqrt(x) * (y * 3.0) elif x <= 1.65e-7: tmp = math.sqrt(x) * (3.0 * ((0.1111111111111111 / x) + -1.0)) else: tmp = math.sqrt((x * 9.0)) * (y + -1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= 1.3e-65) tmp = Float64(x * 9.0) ^ -0.5; elseif (x <= 2.2e-21) tmp = Float64(sqrt(x) * Float64(y * 3.0)); elseif (x <= 1.65e-7) tmp = Float64(sqrt(x) * Float64(3.0 * Float64(Float64(0.1111111111111111 / x) + -1.0))); else tmp = Float64(sqrt(Float64(x * 9.0)) * Float64(y + -1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 1.3e-65) tmp = (x * 9.0) ^ -0.5; elseif (x <= 2.2e-21) tmp = sqrt(x) * (y * 3.0); elseif (x <= 1.65e-7) tmp = sqrt(x) * (3.0 * ((0.1111111111111111 / x) + -1.0)); else tmp = sqrt((x * 9.0)) * (y + -1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 1.3e-65], N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision], If[LessEqual[x, 2.2e-21], N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.65e-7], N[(N[Sqrt[x], $MachinePrecision] * N[(3.0 * N[(N[(0.1111111111111111 / x), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.3 \cdot 10^{-65}:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-21}:\\
\;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\
\mathbf{elif}\;x \leq 1.65 \cdot 10^{-7}:\\
\;\;\;\;\sqrt{x} \cdot \left(3 \cdot \left(\frac{0.1111111111111111}{x} + -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x \cdot 9} \cdot \left(y + -1\right)\\
\end{array}
\end{array}
if x < 1.30000000000000005e-65Initial program 99.2%
*-commutative99.2%
associate-*l*99.1%
associate--l+99.1%
distribute-lft-in99.1%
fma-define99.2%
sub-neg99.2%
+-commutative99.2%
distribute-lft-in99.2%
metadata-eval99.2%
metadata-eval99.2%
*-commutative99.2%
associate-/r*99.2%
associate-*r/99.2%
metadata-eval99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around 0 83.4%
metadata-eval83.4%
sqrt-prod83.6%
metadata-eval83.6%
inv-pow83.6%
unpow-prod-down83.8%
*-commutative83.8%
sqrt-pow183.7%
metadata-eval83.7%
Applied egg-rr83.7%
if 1.30000000000000005e-65 < x < 2.2000000000000001e-21Initial program 99.2%
sub-neg99.2%
+-commutative99.2%
associate-+l+99.2%
*-commutative99.2%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
*-commutative99.2%
metadata-eval99.2%
sqrt-prod99.3%
pow199.3%
Applied egg-rr99.1%
unpow199.3%
Simplified99.1%
add-sqr-sqrt98.9%
pow298.9%
pow1/298.9%
sqrt-pow199.2%
metadata-eval99.2%
Applied egg-rr99.2%
Taylor expanded in y around inf 61.7%
associate-*r*61.6%
*-commutative61.6%
associate-*r*61.7%
Simplified61.7%
if 2.2000000000000001e-21 < x < 1.6500000000000001e-7Initial program 98.8%
sub-neg98.8%
+-commutative98.8%
associate-+l+98.8%
*-commutative98.8%
associate-/r*98.9%
metadata-eval98.9%
metadata-eval98.9%
Simplified98.9%
Taylor expanded in y around 0 85.2%
associate-*r*85.0%
*-commutative85.0%
sub-neg85.0%
associate-*r/84.7%
metadata-eval84.7%
metadata-eval84.7%
associate-*l*85.4%
+-commutative85.4%
Simplified85.4%
if 1.6500000000000001e-7 < x Initial program 99.5%
sub-neg99.5%
+-commutative99.5%
associate-+l+99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.7%
pow199.7%
Applied egg-rr99.7%
unpow199.7%
Simplified99.7%
Taylor expanded in x around inf 98.6%
Final simplification89.6%
(FPCore (x y)
:precision binary64
(if (<= x 1.65e-65)
(pow (* x 9.0) -0.5)
(if (<= x 2e-21)
(* (sqrt x) (* y 3.0))
(if (<= x 3.8e-6)
(* (sqrt x) (+ (/ 0.3333333333333333 x) -3.0))
(* (sqrt (* x 9.0)) (+ y -1.0))))))
double code(double x, double y) {
double tmp;
if (x <= 1.65e-65) {
tmp = pow((x * 9.0), -0.5);
} else if (x <= 2e-21) {
tmp = sqrt(x) * (y * 3.0);
} else if (x <= 3.8e-6) {
tmp = sqrt(x) * ((0.3333333333333333 / x) + -3.0);
} else {
tmp = sqrt((x * 9.0)) * (y + -1.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 1.65d-65) then
tmp = (x * 9.0d0) ** (-0.5d0)
else if (x <= 2d-21) then
tmp = sqrt(x) * (y * 3.0d0)
else if (x <= 3.8d-6) then
tmp = sqrt(x) * ((0.3333333333333333d0 / x) + (-3.0d0))
else
tmp = sqrt((x * 9.0d0)) * (y + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 1.65e-65) {
tmp = Math.pow((x * 9.0), -0.5);
} else if (x <= 2e-21) {
tmp = Math.sqrt(x) * (y * 3.0);
} else if (x <= 3.8e-6) {
tmp = Math.sqrt(x) * ((0.3333333333333333 / x) + -3.0);
} else {
tmp = Math.sqrt((x * 9.0)) * (y + -1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 1.65e-65: tmp = math.pow((x * 9.0), -0.5) elif x <= 2e-21: tmp = math.sqrt(x) * (y * 3.0) elif x <= 3.8e-6: tmp = math.sqrt(x) * ((0.3333333333333333 / x) + -3.0) else: tmp = math.sqrt((x * 9.0)) * (y + -1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= 1.65e-65) tmp = Float64(x * 9.0) ^ -0.5; elseif (x <= 2e-21) tmp = Float64(sqrt(x) * Float64(y * 3.0)); elseif (x <= 3.8e-6) tmp = Float64(sqrt(x) * Float64(Float64(0.3333333333333333 / x) + -3.0)); else tmp = Float64(sqrt(Float64(x * 9.0)) * Float64(y + -1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 1.65e-65) tmp = (x * 9.0) ^ -0.5; elseif (x <= 2e-21) tmp = sqrt(x) * (y * 3.0); elseif (x <= 3.8e-6) tmp = sqrt(x) * ((0.3333333333333333 / x) + -3.0); else tmp = sqrt((x * 9.0)) * (y + -1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 1.65e-65], N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision], If[LessEqual[x, 2e-21], N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.8e-6], N[(N[Sqrt[x], $MachinePrecision] * N[(N[(0.3333333333333333 / x), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.65 \cdot 10^{-65}:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\
\mathbf{elif}\;x \leq 2 \cdot 10^{-21}:\\
\;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{-6}:\\
\;\;\;\;\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x \cdot 9} \cdot \left(y + -1\right)\\
\end{array}
\end{array}
if x < 1.6500000000000001e-65Initial program 99.2%
*-commutative99.2%
associate-*l*99.1%
associate--l+99.1%
distribute-lft-in99.1%
fma-define99.2%
sub-neg99.2%
+-commutative99.2%
distribute-lft-in99.2%
metadata-eval99.2%
metadata-eval99.2%
*-commutative99.2%
associate-/r*99.2%
associate-*r/99.2%
metadata-eval99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around 0 83.4%
metadata-eval83.4%
sqrt-prod83.6%
metadata-eval83.6%
inv-pow83.6%
unpow-prod-down83.8%
*-commutative83.8%
sqrt-pow183.7%
metadata-eval83.7%
Applied egg-rr83.7%
if 1.6500000000000001e-65 < x < 1.99999999999999982e-21Initial program 99.2%
sub-neg99.2%
+-commutative99.2%
associate-+l+99.2%
*-commutative99.2%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
*-commutative99.2%
metadata-eval99.2%
sqrt-prod99.3%
pow199.3%
Applied egg-rr99.1%
unpow199.3%
Simplified99.1%
add-sqr-sqrt98.9%
pow298.9%
pow1/298.9%
sqrt-pow199.2%
metadata-eval99.2%
Applied egg-rr99.2%
Taylor expanded in y around inf 61.7%
associate-*r*61.6%
*-commutative61.6%
associate-*r*61.7%
Simplified61.7%
if 1.99999999999999982e-21 < x < 3.8e-6Initial program 98.8%
sub-neg98.8%
+-commutative98.8%
associate-+l+98.8%
*-commutative98.8%
associate-/r*98.9%
metadata-eval98.9%
metadata-eval98.9%
Simplified98.9%
Taylor expanded in y around 0 85.2%
associate-*r*85.0%
*-commutative85.0%
sub-neg85.0%
associate-*r/84.7%
metadata-eval84.7%
metadata-eval84.7%
associate-*l*85.4%
+-commutative85.4%
Simplified85.4%
+-commutative85.4%
distribute-lft-in85.4%
associate-*r/85.2%
metadata-eval85.2%
metadata-eval85.2%
Applied egg-rr85.2%
if 3.8e-6 < x Initial program 99.5%
sub-neg99.5%
+-commutative99.5%
associate-+l+99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.7%
pow199.7%
Applied egg-rr99.7%
unpow199.7%
Simplified99.7%
Taylor expanded in x around inf 98.6%
Final simplification89.6%
(FPCore (x y)
:precision binary64
(if (<= x 1.95e-65)
(pow (* x 9.0) -0.5)
(if (<= x 3e-21)
(* (sqrt x) (* y 3.0))
(if (<= x 8.5e-11)
(* (sqrt x) (+ (/ 0.3333333333333333 x) -3.0))
(* (sqrt x) (- (* y 3.0) 3.0))))))
double code(double x, double y) {
double tmp;
if (x <= 1.95e-65) {
tmp = pow((x * 9.0), -0.5);
} else if (x <= 3e-21) {
tmp = sqrt(x) * (y * 3.0);
} else if (x <= 8.5e-11) {
tmp = sqrt(x) * ((0.3333333333333333 / x) + -3.0);
} else {
tmp = sqrt(x) * ((y * 3.0) - 3.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 1.95d-65) then
tmp = (x * 9.0d0) ** (-0.5d0)
else if (x <= 3d-21) then
tmp = sqrt(x) * (y * 3.0d0)
else if (x <= 8.5d-11) then
tmp = sqrt(x) * ((0.3333333333333333d0 / x) + (-3.0d0))
else
tmp = sqrt(x) * ((y * 3.0d0) - 3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 1.95e-65) {
tmp = Math.pow((x * 9.0), -0.5);
} else if (x <= 3e-21) {
tmp = Math.sqrt(x) * (y * 3.0);
} else if (x <= 8.5e-11) {
tmp = Math.sqrt(x) * ((0.3333333333333333 / x) + -3.0);
} else {
tmp = Math.sqrt(x) * ((y * 3.0) - 3.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 1.95e-65: tmp = math.pow((x * 9.0), -0.5) elif x <= 3e-21: tmp = math.sqrt(x) * (y * 3.0) elif x <= 8.5e-11: tmp = math.sqrt(x) * ((0.3333333333333333 / x) + -3.0) else: tmp = math.sqrt(x) * ((y * 3.0) - 3.0) return tmp
function code(x, y) tmp = 0.0 if (x <= 1.95e-65) tmp = Float64(x * 9.0) ^ -0.5; elseif (x <= 3e-21) tmp = Float64(sqrt(x) * Float64(y * 3.0)); elseif (x <= 8.5e-11) tmp = Float64(sqrt(x) * Float64(Float64(0.3333333333333333 / x) + -3.0)); else tmp = Float64(sqrt(x) * Float64(Float64(y * 3.0) - 3.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 1.95e-65) tmp = (x * 9.0) ^ -0.5; elseif (x <= 3e-21) tmp = sqrt(x) * (y * 3.0); elseif (x <= 8.5e-11) tmp = sqrt(x) * ((0.3333333333333333 / x) + -3.0); else tmp = sqrt(x) * ((y * 3.0) - 3.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 1.95e-65], N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision], If[LessEqual[x, 3e-21], N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.5e-11], N[(N[Sqrt[x], $MachinePrecision] * N[(N[(0.3333333333333333 / x), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[x], $MachinePrecision] * N[(N[(y * 3.0), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.95 \cdot 10^{-65}:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-21}:\\
\;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{-11}:\\
\;\;\;\;\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot \left(y \cdot 3 - 3\right)\\
\end{array}
\end{array}
if x < 1.9500000000000002e-65Initial program 99.2%
*-commutative99.2%
associate-*l*99.1%
associate--l+99.1%
distribute-lft-in99.1%
fma-define99.2%
sub-neg99.2%
+-commutative99.2%
distribute-lft-in99.2%
metadata-eval99.2%
metadata-eval99.2%
*-commutative99.2%
associate-/r*99.2%
associate-*r/99.2%
metadata-eval99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around 0 83.4%
metadata-eval83.4%
sqrt-prod83.6%
metadata-eval83.6%
inv-pow83.6%
unpow-prod-down83.8%
*-commutative83.8%
sqrt-pow183.7%
metadata-eval83.7%
Applied egg-rr83.7%
if 1.9500000000000002e-65 < x < 2.99999999999999991e-21Initial program 99.2%
sub-neg99.2%
+-commutative99.2%
associate-+l+99.2%
*-commutative99.2%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
*-commutative99.2%
metadata-eval99.2%
sqrt-prod99.3%
pow199.3%
Applied egg-rr99.1%
unpow199.3%
Simplified99.1%
add-sqr-sqrt98.9%
pow298.9%
pow1/298.9%
sqrt-pow199.2%
metadata-eval99.2%
Applied egg-rr99.2%
Taylor expanded in y around inf 61.7%
associate-*r*61.6%
*-commutative61.6%
associate-*r*61.7%
Simplified61.7%
if 2.99999999999999991e-21 < x < 8.50000000000000037e-11Initial program 98.8%
sub-neg98.8%
+-commutative98.8%
associate-+l+98.8%
*-commutative98.8%
associate-/r*98.9%
metadata-eval98.9%
metadata-eval98.9%
Simplified98.9%
Taylor expanded in y around 0 85.2%
associate-*r*85.0%
*-commutative85.0%
sub-neg85.0%
associate-*r/84.7%
metadata-eval84.7%
metadata-eval84.7%
associate-*l*85.4%
+-commutative85.4%
Simplified85.4%
+-commutative85.4%
distribute-lft-in85.4%
associate-*r/85.2%
metadata-eval85.2%
metadata-eval85.2%
Applied egg-rr85.2%
if 8.50000000000000037e-11 < x Initial program 99.5%
*-commutative99.5%
associate-*l*99.5%
associate--l+99.5%
distribute-lft-in99.5%
fma-define99.5%
sub-neg99.5%
+-commutative99.5%
distribute-lft-in99.5%
metadata-eval99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
associate-*r/99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 98.5%
Final simplification89.5%
(FPCore (x y) :precision binary64 (if (<= x 27.5) (* (sqrt x) (/ (+ 0.3333333333333333 (* 3.0 (* x y))) x)) (* (sqrt (* x 9.0)) (+ y -1.0))))
double code(double x, double y) {
double tmp;
if (x <= 27.5) {
tmp = sqrt(x) * ((0.3333333333333333 + (3.0 * (x * y))) / x);
} else {
tmp = sqrt((x * 9.0)) * (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 <= 27.5d0) then
tmp = sqrt(x) * ((0.3333333333333333d0 + (3.0d0 * (x * y))) / x)
else
tmp = sqrt((x * 9.0d0)) * (y + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 27.5) {
tmp = Math.sqrt(x) * ((0.3333333333333333 + (3.0 * (x * y))) / x);
} else {
tmp = Math.sqrt((x * 9.0)) * (y + -1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 27.5: tmp = math.sqrt(x) * ((0.3333333333333333 + (3.0 * (x * y))) / x) else: tmp = math.sqrt((x * 9.0)) * (y + -1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= 27.5) tmp = Float64(sqrt(x) * Float64(Float64(0.3333333333333333 + Float64(3.0 * Float64(x * y))) / x)); else tmp = Float64(sqrt(Float64(x * 9.0)) * Float64(y + -1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 27.5) tmp = sqrt(x) * ((0.3333333333333333 + (3.0 * (x * y))) / x); else tmp = sqrt((x * 9.0)) * (y + -1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 27.5], N[(N[Sqrt[x], $MachinePrecision] * N[(N[(0.3333333333333333 + N[(3.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 27.5:\\
\;\;\;\;\sqrt{x} \cdot \frac{0.3333333333333333 + 3 \cdot \left(x \cdot y\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x \cdot 9} \cdot \left(y + -1\right)\\
\end{array}
\end{array}
if x < 27.5Initial program 99.2%
*-commutative99.2%
associate-*l*99.2%
associate--l+99.2%
distribute-lft-in99.2%
fma-define99.2%
sub-neg99.2%
+-commutative99.2%
distribute-lft-in99.2%
metadata-eval99.2%
metadata-eval99.2%
*-commutative99.2%
associate-/r*99.3%
associate-*r/99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 99.3%
Taylor expanded in y around inf 98.8%
if 27.5 < x Initial program 99.5%
sub-neg99.5%
+-commutative99.5%
associate-+l+99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.7%
pow199.7%
Applied egg-rr99.7%
unpow199.7%
Simplified99.7%
Taylor expanded in x around inf 98.6%
Final simplification98.7%
(FPCore (x y) :precision binary64 (* (sqrt (* x 9.0)) (+ (/ 0.1111111111111111 x) (+ y -1.0))))
double code(double x, double y) {
return sqrt((x * 9.0)) * ((0.1111111111111111 / x) + (y + -1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sqrt((x * 9.0d0)) * ((0.1111111111111111d0 / x) + (y + (-1.0d0)))
end function
public static double code(double x, double y) {
return Math.sqrt((x * 9.0)) * ((0.1111111111111111 / x) + (y + -1.0));
}
def code(x, y): return math.sqrt((x * 9.0)) * ((0.1111111111111111 / x) + (y + -1.0))
function code(x, y) return Float64(sqrt(Float64(x * 9.0)) * Float64(Float64(0.1111111111111111 / x) + Float64(y + -1.0))) end
function tmp = code(x, y) tmp = sqrt((x * 9.0)) * ((0.1111111111111111 / x) + (y + -1.0)); end
code[x_, y_] := N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * N[(N[(0.1111111111111111 / x), $MachinePrecision] + N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{x \cdot 9} \cdot \left(\frac{0.1111111111111111}{x} + \left(y + -1\right)\right)
\end{array}
Initial program 99.3%
sub-neg99.3%
+-commutative99.3%
associate-+l+99.3%
*-commutative99.3%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
*-commutative99.3%
metadata-eval99.3%
sqrt-prod99.5%
pow199.5%
Applied egg-rr99.5%
unpow199.5%
Simplified99.5%
(FPCore (x y) :precision binary64 (if (<= x 27.5) (pow (* x 9.0) -0.5) (* (sqrt x) -3.0)))
double code(double x, double y) {
double tmp;
if (x <= 27.5) {
tmp = pow((x * 9.0), -0.5);
} else {
tmp = sqrt(x) * -3.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 27.5d0) then
tmp = (x * 9.0d0) ** (-0.5d0)
else
tmp = sqrt(x) * (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 27.5) {
tmp = Math.pow((x * 9.0), -0.5);
} else {
tmp = Math.sqrt(x) * -3.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 27.5: tmp = math.pow((x * 9.0), -0.5) else: tmp = math.sqrt(x) * -3.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 27.5) tmp = Float64(x * 9.0) ^ -0.5; else tmp = Float64(sqrt(x) * -3.0); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 27.5) tmp = (x * 9.0) ^ -0.5; else tmp = sqrt(x) * -3.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 27.5], N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 27.5:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\end{array}
\end{array}
if x < 27.5Initial program 99.2%
*-commutative99.2%
associate-*l*99.2%
associate--l+99.2%
distribute-lft-in99.2%
fma-define99.2%
sub-neg99.2%
+-commutative99.2%
distribute-lft-in99.2%
metadata-eval99.2%
metadata-eval99.2%
*-commutative99.2%
associate-/r*99.3%
associate-*r/99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 75.2%
metadata-eval75.2%
sqrt-prod75.4%
metadata-eval75.4%
inv-pow75.4%
unpow-prod-down75.5%
*-commutative75.5%
sqrt-pow175.5%
metadata-eval75.5%
Applied egg-rr75.5%
if 27.5 < x Initial program 99.5%
sub-neg99.5%
+-commutative99.5%
associate-+l+99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 50.9%
associate-*r*50.9%
*-commutative50.9%
sub-neg50.9%
associate-*r/50.9%
metadata-eval50.9%
metadata-eval50.9%
associate-*l*50.9%
+-commutative50.9%
Simplified50.9%
Taylor expanded in x around inf 49.8%
*-commutative49.8%
Simplified49.8%
(FPCore (x y) :precision binary64 (if (<= x 27.5) (sqrt (/ 0.1111111111111111 x)) (* (sqrt x) -3.0)))
double code(double x, double y) {
double tmp;
if (x <= 27.5) {
tmp = sqrt((0.1111111111111111 / x));
} else {
tmp = sqrt(x) * -3.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 27.5d0) then
tmp = sqrt((0.1111111111111111d0 / x))
else
tmp = sqrt(x) * (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 27.5) {
tmp = Math.sqrt((0.1111111111111111 / x));
} else {
tmp = Math.sqrt(x) * -3.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 27.5: tmp = math.sqrt((0.1111111111111111 / x)) else: tmp = math.sqrt(x) * -3.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 27.5) tmp = sqrt(Float64(0.1111111111111111 / x)); else tmp = Float64(sqrt(x) * -3.0); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 27.5) tmp = sqrt((0.1111111111111111 / x)); else tmp = sqrt(x) * -3.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 27.5], N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 27.5:\\
\;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\end{array}
\end{array}
if x < 27.5Initial program 99.2%
*-commutative99.2%
associate-*l*99.2%
associate--l+99.2%
distribute-lft-in99.2%
fma-define99.2%
sub-neg99.2%
+-commutative99.2%
distribute-lft-in99.2%
metadata-eval99.2%
metadata-eval99.2%
*-commutative99.2%
associate-/r*99.3%
associate-*r/99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 75.2%
metadata-eval75.2%
sqrt-prod75.4%
div-inv75.4%
Applied egg-rr75.4%
if 27.5 < x Initial program 99.5%
sub-neg99.5%
+-commutative99.5%
associate-+l+99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 50.9%
associate-*r*50.9%
*-commutative50.9%
sub-neg50.9%
associate-*r/50.9%
metadata-eval50.9%
metadata-eval50.9%
associate-*l*50.9%
+-commutative50.9%
Simplified50.9%
Taylor expanded in x around inf 49.8%
*-commutative49.8%
Simplified49.8%
(FPCore (x y) :precision binary64 (sqrt (/ 0.1111111111111111 x)))
double code(double x, double y) {
return sqrt((0.1111111111111111 / x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sqrt((0.1111111111111111d0 / x))
end function
public static double code(double x, double y) {
return Math.sqrt((0.1111111111111111 / x));
}
def code(x, y): return math.sqrt((0.1111111111111111 / x))
function code(x, y) return sqrt(Float64(0.1111111111111111 / x)) end
function tmp = code(x, y) tmp = sqrt((0.1111111111111111 / x)); end
code[x_, y_] := N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\frac{0.1111111111111111}{x}}
\end{array}
Initial program 99.3%
*-commutative99.3%
associate-*l*99.3%
associate--l+99.3%
distribute-lft-in99.3%
fma-define99.4%
sub-neg99.4%
+-commutative99.4%
distribute-lft-in99.3%
metadata-eval99.3%
metadata-eval99.3%
*-commutative99.3%
associate-/r*99.4%
associate-*r/99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 40.9%
metadata-eval40.9%
sqrt-prod41.0%
div-inv41.1%
Applied egg-rr41.1%
(FPCore (x y) :precision binary64 (sqrt (* x 9.0)))
double code(double x, double y) {
return sqrt((x * 9.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sqrt((x * 9.0d0))
end function
public static double code(double x, double y) {
return Math.sqrt((x * 9.0));
}
def code(x, y): return math.sqrt((x * 9.0))
function code(x, y) return sqrt(Float64(x * 9.0)) end
function tmp = code(x, y) tmp = sqrt((x * 9.0)); end
code[x_, y_] := N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{x \cdot 9}
\end{array}
Initial program 99.3%
sub-neg99.3%
+-commutative99.3%
associate-+l+99.3%
*-commutative99.3%
associate-/r*99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in y around 0 63.9%
associate-*r*63.9%
*-commutative63.9%
sub-neg63.9%
associate-*r/63.9%
metadata-eval63.9%
metadata-eval63.9%
associate-*l*64.0%
+-commutative64.0%
Simplified64.0%
Taylor expanded in x around inf 24.3%
*-commutative24.3%
Simplified24.3%
add-sqr-sqrt0.0%
sqrt-unprod3.5%
swap-sqr3.5%
add-sqr-sqrt3.5%
metadata-eval3.5%
pow1/23.5%
Applied egg-rr3.5%
unpow1/23.5%
Simplified3.5%
(FPCore (x y) :precision binary64 (* 3.0 (+ (* y (sqrt x)) (* (- (/ 1.0 (* x 9.0)) 1.0) (sqrt x)))))
double code(double x, double y) {
return 3.0 * ((y * sqrt(x)) + (((1.0 / (x * 9.0)) - 1.0) * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 3.0d0 * ((y * sqrt(x)) + (((1.0d0 / (x * 9.0d0)) - 1.0d0) * sqrt(x)))
end function
public static double code(double x, double y) {
return 3.0 * ((y * Math.sqrt(x)) + (((1.0 / (x * 9.0)) - 1.0) * Math.sqrt(x)));
}
def code(x, y): return 3.0 * ((y * math.sqrt(x)) + (((1.0 / (x * 9.0)) - 1.0) * math.sqrt(x)))
function code(x, y) return Float64(3.0 * Float64(Float64(y * sqrt(x)) + Float64(Float64(Float64(1.0 / Float64(x * 9.0)) - 1.0) * sqrt(x)))) end
function tmp = code(x, y) tmp = 3.0 * ((y * sqrt(x)) + (((1.0 / (x * 9.0)) - 1.0) * sqrt(x))); end
code[x_, y_] := N[(3.0 * N[(N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] + N[(N[(N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
3 \cdot \left(y \cdot \sqrt{x} + \left(\frac{1}{x \cdot 9} - 1\right) \cdot \sqrt{x}\right)
\end{array}
herbie shell --seed 2024103
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteGamma from math-functions-0.1.5.2, B"
:precision binary64
:alt
(* 3.0 (+ (* y (sqrt x)) (* (- (/ 1.0 (* x 9.0)) 1.0) (sqrt x))))
(* (* 3.0 (sqrt x)) (- (+ y (/ 1.0 (* x 9.0))) 1.0)))