
(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 12 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.5%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y)
:precision binary64
(let* ((t_0 (pow (* x 9.0) -0.5)))
(if (<= y -1.35e+77)
(* y (* (sqrt x) 3.0))
(if (<= y -5.2e-9)
t_0
(if (<= y -5.2e-90)
(* (sqrt x) -3.0)
(if (<= y 1.85e+34) t_0 (* (sqrt (* x 9.0)) y)))))))
double code(double x, double y) {
double t_0 = pow((x * 9.0), -0.5);
double tmp;
if (y <= -1.35e+77) {
tmp = y * (sqrt(x) * 3.0);
} else if (y <= -5.2e-9) {
tmp = t_0;
} else if (y <= -5.2e-90) {
tmp = sqrt(x) * -3.0;
} else if (y <= 1.85e+34) {
tmp = t_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 = (x * 9.0d0) ** (-0.5d0)
if (y <= (-1.35d+77)) then
tmp = y * (sqrt(x) * 3.0d0)
else if (y <= (-5.2d-9)) then
tmp = t_0
else if (y <= (-5.2d-90)) then
tmp = sqrt(x) * (-3.0d0)
else if (y <= 1.85d+34) then
tmp = t_0
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.pow((x * 9.0), -0.5);
double tmp;
if (y <= -1.35e+77) {
tmp = y * (Math.sqrt(x) * 3.0);
} else if (y <= -5.2e-9) {
tmp = t_0;
} else if (y <= -5.2e-90) {
tmp = Math.sqrt(x) * -3.0;
} else if (y <= 1.85e+34) {
tmp = t_0;
} else {
tmp = Math.sqrt((x * 9.0)) * y;
}
return tmp;
}
def code(x, y): t_0 = math.pow((x * 9.0), -0.5) tmp = 0 if y <= -1.35e+77: tmp = y * (math.sqrt(x) * 3.0) elif y <= -5.2e-9: tmp = t_0 elif y <= -5.2e-90: tmp = math.sqrt(x) * -3.0 elif y <= 1.85e+34: tmp = t_0 else: tmp = math.sqrt((x * 9.0)) * y return tmp
function code(x, y) t_0 = Float64(x * 9.0) ^ -0.5 tmp = 0.0 if (y <= -1.35e+77) tmp = Float64(y * Float64(sqrt(x) * 3.0)); elseif (y <= -5.2e-9) tmp = t_0; elseif (y <= -5.2e-90) tmp = Float64(sqrt(x) * -3.0); elseif (y <= 1.85e+34) tmp = t_0; else tmp = Float64(sqrt(Float64(x * 9.0)) * y); end return tmp end
function tmp_2 = code(x, y) t_0 = (x * 9.0) ^ -0.5; tmp = 0.0; if (y <= -1.35e+77) tmp = y * (sqrt(x) * 3.0); elseif (y <= -5.2e-9) tmp = t_0; elseif (y <= -5.2e-90) tmp = sqrt(x) * -3.0; elseif (y <= 1.85e+34) tmp = t_0; else tmp = sqrt((x * 9.0)) * y; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[y, -1.35e+77], N[(y * N[(N[Sqrt[x], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.2e-9], t$95$0, If[LessEqual[y, -5.2e-90], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision], If[LessEqual[y, 1.85e+34], t$95$0, N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(x \cdot 9\right)}^{-0.5}\\
\mathbf{if}\;y \leq -1.35 \cdot 10^{+77}:\\
\;\;\;\;y \cdot \left(\sqrt{x} \cdot 3\right)\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-9}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-90}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{+34}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x \cdot 9} \cdot y\\
\end{array}
\end{array}
if y < -1.3499999999999999e77Initial program 99.7%
sub-neg99.7%
+-commutative99.7%
associate-+l+99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 87.5%
if -1.3499999999999999e77 < y < -5.2000000000000002e-9 or -5.2000000000000001e-90 < y < 1.85000000000000004e34Initial program 99.2%
*-commutative99.2%
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 x around 0 61.8%
metadata-eval61.8%
sqrt-prod61.9%
metadata-eval61.9%
inv-pow61.9%
unpow-prod-down62.0%
*-commutative62.0%
sqrt-pow162.1%
metadata-eval62.1%
Applied egg-rr62.1%
if -5.2000000000000002e-9 < y < -5.2000000000000001e-90Initial program 99.6%
sub-neg99.6%
+-commutative99.6%
associate-+l+99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 68.5%
Taylor expanded in y around 0 66.7%
*-commutative66.7%
Simplified66.7%
if 1.85000000000000004e34 < y Initial program 99.6%
sub-neg99.6%
+-commutative99.6%
associate-+l+99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.6%
unpow1/299.7%
Simplified99.6%
Taylor expanded in y around inf 85.5%
Final simplification73.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (pow (* x 9.0) -0.5)))
(if (<= y -8.2e+76)
(* 3.0 (* y (sqrt x)))
(if (<= y -5.2e-9)
t_0
(if (<= y -1.15e-89)
(* (sqrt x) -3.0)
(if (<= y 2.5e+34) t_0 (* (sqrt (* x 9.0)) y)))))))
double code(double x, double y) {
double t_0 = pow((x * 9.0), -0.5);
double tmp;
if (y <= -8.2e+76) {
tmp = 3.0 * (y * sqrt(x));
} else if (y <= -5.2e-9) {
tmp = t_0;
} else if (y <= -1.15e-89) {
tmp = sqrt(x) * -3.0;
} else if (y <= 2.5e+34) {
tmp = t_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 = (x * 9.0d0) ** (-0.5d0)
if (y <= (-8.2d+76)) then
tmp = 3.0d0 * (y * sqrt(x))
else if (y <= (-5.2d-9)) then
tmp = t_0
else if (y <= (-1.15d-89)) then
tmp = sqrt(x) * (-3.0d0)
else if (y <= 2.5d+34) then
tmp = t_0
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.pow((x * 9.0), -0.5);
double tmp;
if (y <= -8.2e+76) {
tmp = 3.0 * (y * Math.sqrt(x));
} else if (y <= -5.2e-9) {
tmp = t_0;
} else if (y <= -1.15e-89) {
tmp = Math.sqrt(x) * -3.0;
} else if (y <= 2.5e+34) {
tmp = t_0;
} else {
tmp = Math.sqrt((x * 9.0)) * y;
}
return tmp;
}
def code(x, y): t_0 = math.pow((x * 9.0), -0.5) tmp = 0 if y <= -8.2e+76: tmp = 3.0 * (y * math.sqrt(x)) elif y <= -5.2e-9: tmp = t_0 elif y <= -1.15e-89: tmp = math.sqrt(x) * -3.0 elif y <= 2.5e+34: tmp = t_0 else: tmp = math.sqrt((x * 9.0)) * y return tmp
function code(x, y) t_0 = Float64(x * 9.0) ^ -0.5 tmp = 0.0 if (y <= -8.2e+76) tmp = Float64(3.0 * Float64(y * sqrt(x))); elseif (y <= -5.2e-9) tmp = t_0; elseif (y <= -1.15e-89) tmp = Float64(sqrt(x) * -3.0); elseif (y <= 2.5e+34) tmp = t_0; else tmp = Float64(sqrt(Float64(x * 9.0)) * y); end return tmp end
function tmp_2 = code(x, y) t_0 = (x * 9.0) ^ -0.5; tmp = 0.0; if (y <= -8.2e+76) tmp = 3.0 * (y * sqrt(x)); elseif (y <= -5.2e-9) tmp = t_0; elseif (y <= -1.15e-89) tmp = sqrt(x) * -3.0; elseif (y <= 2.5e+34) tmp = t_0; else tmp = sqrt((x * 9.0)) * y; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[y, -8.2e+76], N[(3.0 * N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.2e-9], t$95$0, If[LessEqual[y, -1.15e-89], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision], If[LessEqual[y, 2.5e+34], t$95$0, N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(x \cdot 9\right)}^{-0.5}\\
\mathbf{if}\;y \leq -8.2 \cdot 10^{+76}:\\
\;\;\;\;3 \cdot \left(y \cdot \sqrt{x}\right)\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-9}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -1.15 \cdot 10^{-89}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+34}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x \cdot 9} \cdot y\\
\end{array}
\end{array}
if y < -8.1999999999999997e76Initial program 99.7%
*-commutative99.7%
associate-*l*99.3%
associate--l+99.3%
distribute-lft-in99.3%
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 87.5%
if -8.1999999999999997e76 < y < -5.2000000000000002e-9 or -1.15e-89 < y < 2.4999999999999999e34Initial program 99.2%
*-commutative99.2%
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 x around 0 61.8%
metadata-eval61.8%
sqrt-prod61.9%
metadata-eval61.9%
inv-pow61.9%
unpow-prod-down62.0%
*-commutative62.0%
sqrt-pow162.1%
metadata-eval62.1%
Applied egg-rr62.1%
if -5.2000000000000002e-9 < y < -1.15e-89Initial program 99.6%
sub-neg99.6%
+-commutative99.6%
associate-+l+99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 68.5%
Taylor expanded in y around 0 66.7%
*-commutative66.7%
Simplified66.7%
if 2.4999999999999999e34 < y Initial program 99.6%
sub-neg99.6%
+-commutative99.6%
associate-+l+99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.6%
unpow1/299.7%
Simplified99.6%
Taylor expanded in y around inf 85.5%
Final simplification73.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (pow (* x 9.0) -0.5)))
(if (<= y -8.2e+76)
(* 3.0 (* y (sqrt x)))
(if (<= y -5.2e-9)
t_0
(if (<= y -8e-90)
(* (sqrt x) -3.0)
(if (<= y 1.1e+35) t_0 (* (sqrt x) (* y 3.0))))))))
double code(double x, double y) {
double t_0 = pow((x * 9.0), -0.5);
double tmp;
if (y <= -8.2e+76) {
tmp = 3.0 * (y * sqrt(x));
} else if (y <= -5.2e-9) {
tmp = t_0;
} else if (y <= -8e-90) {
tmp = sqrt(x) * -3.0;
} else if (y <= 1.1e+35) {
tmp = t_0;
} else {
tmp = sqrt(x) * (y * 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 = (x * 9.0d0) ** (-0.5d0)
if (y <= (-8.2d+76)) then
tmp = 3.0d0 * (y * sqrt(x))
else if (y <= (-5.2d-9)) then
tmp = t_0
else if (y <= (-8d-90)) then
tmp = sqrt(x) * (-3.0d0)
else if (y <= 1.1d+35) then
tmp = t_0
else
tmp = sqrt(x) * (y * 3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.pow((x * 9.0), -0.5);
double tmp;
if (y <= -8.2e+76) {
tmp = 3.0 * (y * Math.sqrt(x));
} else if (y <= -5.2e-9) {
tmp = t_0;
} else if (y <= -8e-90) {
tmp = Math.sqrt(x) * -3.0;
} else if (y <= 1.1e+35) {
tmp = t_0;
} else {
tmp = Math.sqrt(x) * (y * 3.0);
}
return tmp;
}
def code(x, y): t_0 = math.pow((x * 9.0), -0.5) tmp = 0 if y <= -8.2e+76: tmp = 3.0 * (y * math.sqrt(x)) elif y <= -5.2e-9: tmp = t_0 elif y <= -8e-90: tmp = math.sqrt(x) * -3.0 elif y <= 1.1e+35: tmp = t_0 else: tmp = math.sqrt(x) * (y * 3.0) return tmp
function code(x, y) t_0 = Float64(x * 9.0) ^ -0.5 tmp = 0.0 if (y <= -8.2e+76) tmp = Float64(3.0 * Float64(y * sqrt(x))); elseif (y <= -5.2e-9) tmp = t_0; elseif (y <= -8e-90) tmp = Float64(sqrt(x) * -3.0); elseif (y <= 1.1e+35) tmp = t_0; else tmp = Float64(sqrt(x) * Float64(y * 3.0)); end return tmp end
function tmp_2 = code(x, y) t_0 = (x * 9.0) ^ -0.5; tmp = 0.0; if (y <= -8.2e+76) tmp = 3.0 * (y * sqrt(x)); elseif (y <= -5.2e-9) tmp = t_0; elseif (y <= -8e-90) tmp = sqrt(x) * -3.0; elseif (y <= 1.1e+35) tmp = t_0; else tmp = sqrt(x) * (y * 3.0); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[y, -8.2e+76], N[(3.0 * N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.2e-9], t$95$0, If[LessEqual[y, -8e-90], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision], If[LessEqual[y, 1.1e+35], t$95$0, N[(N[Sqrt[x], $MachinePrecision] * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\left(x \cdot 9\right)}^{-0.5}\\
\mathbf{if}\;y \leq -8.2 \cdot 10^{+76}:\\
\;\;\;\;3 \cdot \left(y \cdot \sqrt{x}\right)\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-9}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -8 \cdot 10^{-90}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+35}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot \left(y \cdot 3\right)\\
\end{array}
\end{array}
if y < -8.1999999999999997e76Initial program 99.7%
*-commutative99.7%
associate-*l*99.3%
associate--l+99.3%
distribute-lft-in99.3%
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 87.5%
if -8.1999999999999997e76 < y < -5.2000000000000002e-9 or -7.99999999999999996e-90 < y < 1.0999999999999999e35Initial program 99.2%
*-commutative99.2%
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 x around 0 61.8%
metadata-eval61.8%
sqrt-prod61.9%
metadata-eval61.9%
inv-pow61.9%
unpow-prod-down62.0%
*-commutative62.0%
sqrt-pow162.1%
metadata-eval62.1%
Applied egg-rr62.1%
if -5.2000000000000002e-9 < y < -7.99999999999999996e-90Initial program 99.6%
sub-neg99.6%
+-commutative99.6%
associate-+l+99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 68.5%
Taylor expanded in y around 0 66.7%
*-commutative66.7%
Simplified66.7%
if 1.0999999999999999e35 < y Initial program 99.6%
*-commutative99.6%
associate-*l*99.4%
associate--l+99.4%
distribute-lft-in99.4%
fma-define99.3%
sub-neg99.3%
+-commutative99.3%
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 y around inf 85.2%
*-commutative85.2%
associate-*l*85.4%
*-commutative85.4%
Simplified85.4%
Final simplification73.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* 3.0 (* y (sqrt x)))) (t_1 (pow (* x 9.0) -0.5)))
(if (<= y -2.2e+77)
t_0
(if (<= y -5.5e-9)
t_1
(if (<= y -7.2e-89) (* (sqrt x) -3.0) (if (<= y 1.45e+34) t_1 t_0))))))
double code(double x, double y) {
double t_0 = 3.0 * (y * sqrt(x));
double t_1 = pow((x * 9.0), -0.5);
double tmp;
if (y <= -2.2e+77) {
tmp = t_0;
} else if (y <= -5.5e-9) {
tmp = t_1;
} else if (y <= -7.2e-89) {
tmp = sqrt(x) * -3.0;
} else if (y <= 1.45e+34) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_0 = 3.0d0 * (y * sqrt(x))
t_1 = (x * 9.0d0) ** (-0.5d0)
if (y <= (-2.2d+77)) then
tmp = t_0
else if (y <= (-5.5d-9)) then
tmp = t_1
else if (y <= (-7.2d-89)) then
tmp = sqrt(x) * (-3.0d0)
else if (y <= 1.45d+34) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 3.0 * (y * Math.sqrt(x));
double t_1 = Math.pow((x * 9.0), -0.5);
double tmp;
if (y <= -2.2e+77) {
tmp = t_0;
} else if (y <= -5.5e-9) {
tmp = t_1;
} else if (y <= -7.2e-89) {
tmp = Math.sqrt(x) * -3.0;
} else if (y <= 1.45e+34) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = 3.0 * (y * math.sqrt(x)) t_1 = math.pow((x * 9.0), -0.5) tmp = 0 if y <= -2.2e+77: tmp = t_0 elif y <= -5.5e-9: tmp = t_1 elif y <= -7.2e-89: tmp = math.sqrt(x) * -3.0 elif y <= 1.45e+34: tmp = t_1 else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(3.0 * Float64(y * sqrt(x))) t_1 = Float64(x * 9.0) ^ -0.5 tmp = 0.0 if (y <= -2.2e+77) tmp = t_0; elseif (y <= -5.5e-9) tmp = t_1; elseif (y <= -7.2e-89) tmp = Float64(sqrt(x) * -3.0); elseif (y <= 1.45e+34) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = 3.0 * (y * sqrt(x)); t_1 = (x * 9.0) ^ -0.5; tmp = 0.0; if (y <= -2.2e+77) tmp = t_0; elseif (y <= -5.5e-9) tmp = t_1; elseif (y <= -7.2e-89) tmp = sqrt(x) * -3.0; elseif (y <= 1.45e+34) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(3.0 * N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(x * 9.0), $MachinePrecision], -0.5], $MachinePrecision]}, If[LessEqual[y, -2.2e+77], t$95$0, If[LessEqual[y, -5.5e-9], t$95$1, If[LessEqual[y, -7.2e-89], N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision], If[LessEqual[y, 1.45e+34], t$95$1, t$95$0]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 3 \cdot \left(y \cdot \sqrt{x}\right)\\
t_1 := {\left(x \cdot 9\right)}^{-0.5}\\
\mathbf{if}\;y \leq -2.2 \cdot 10^{+77}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -5.5 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -7.2 \cdot 10^{-89}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -2.2e77 or 1.4500000000000001e34 < y Initial program 99.7%
*-commutative99.7%
associate-*l*99.4%
associate--l+99.4%
distribute-lft-in99.4%
fma-define99.4%
sub-neg99.4%
+-commutative99.4%
distribute-lft-in99.4%
metadata-eval99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
associate-*r/99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 86.3%
if -2.2e77 < y < -5.4999999999999996e-9 or -7.20000000000000014e-89 < y < 1.4500000000000001e34Initial program 99.2%
*-commutative99.2%
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 x around 0 61.8%
metadata-eval61.8%
sqrt-prod61.9%
metadata-eval61.9%
inv-pow61.9%
unpow-prod-down62.0%
*-commutative62.0%
sqrt-pow162.1%
metadata-eval62.1%
Applied egg-rr62.1%
if -5.4999999999999996e-9 < y < -7.20000000000000014e-89Initial program 99.6%
sub-neg99.6%
+-commutative99.6%
associate-+l+99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 68.5%
Taylor expanded in y around 0 66.7%
*-commutative66.7%
Simplified66.7%
Final simplification73.4%
(FPCore (x y)
:precision binary64
(if (<= y -2.35e+78)
(* y (* (sqrt x) 3.0))
(if (<= y 2.2e+34)
(* (sqrt x) (+ (/ 0.3333333333333333 x) -3.0))
(* (sqrt (* x 9.0)) (+ y -1.0)))))
double code(double x, double y) {
double tmp;
if (y <= -2.35e+78) {
tmp = y * (sqrt(x) * 3.0);
} else if (y <= 2.2e+34) {
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 (y <= (-2.35d+78)) then
tmp = y * (sqrt(x) * 3.0d0)
else if (y <= 2.2d+34) 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 (y <= -2.35e+78) {
tmp = y * (Math.sqrt(x) * 3.0);
} else if (y <= 2.2e+34) {
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 y <= -2.35e+78: tmp = y * (math.sqrt(x) * 3.0) elif y <= 2.2e+34: 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 (y <= -2.35e+78) tmp = Float64(y * Float64(sqrt(x) * 3.0)); elseif (y <= 2.2e+34) 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 (y <= -2.35e+78) tmp = y * (sqrt(x) * 3.0); elseif (y <= 2.2e+34) 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[y, -2.35e+78], N[(y * N[(N[Sqrt[x], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e+34], 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}\;y \leq -2.35 \cdot 10^{+78}:\\
\;\;\;\;y \cdot \left(\sqrt{x} \cdot 3\right)\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+34}:\\
\;\;\;\;\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 y < -2.35000000000000003e78Initial program 99.7%
sub-neg99.7%
+-commutative99.7%
associate-+l+99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 87.5%
if -2.35000000000000003e78 < y < 2.2000000000000002e34Initial program 99.3%
*-commutative99.3%
associate-*l*99.4%
associate--l+99.4%
distribute-lft-in99.4%
fma-define99.4%
sub-neg99.4%
+-commutative99.4%
distribute-lft-in99.4%
metadata-eval99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.3%
associate-*r/99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around 0 94.7%
sub-neg94.7%
metadata-eval94.7%
associate-*r/94.8%
metadata-eval94.8%
+-commutative94.8%
Simplified94.8%
if 2.2000000000000002e34 < y Initial program 99.6%
sub-neg99.6%
+-commutative99.6%
associate-+l+99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 85.4%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr85.5%
unpow1/299.7%
Simplified85.5%
Final simplification91.0%
(FPCore (x y)
:precision binary64
(if (<= y -5.8e+78)
(* y (* (sqrt x) 3.0))
(if (<= y 1.4e+34)
(* (sqrt x) (+ (/ 0.3333333333333333 x) -3.0))
(* (sqrt (* x 9.0)) y))))
double code(double x, double y) {
double tmp;
if (y <= -5.8e+78) {
tmp = y * (sqrt(x) * 3.0);
} else if (y <= 1.4e+34) {
tmp = sqrt(x) * ((0.3333333333333333 / 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 (y <= (-5.8d+78)) then
tmp = y * (sqrt(x) * 3.0d0)
else if (y <= 1.4d+34) then
tmp = sqrt(x) * ((0.3333333333333333d0 / 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 (y <= -5.8e+78) {
tmp = y * (Math.sqrt(x) * 3.0);
} else if (y <= 1.4e+34) {
tmp = Math.sqrt(x) * ((0.3333333333333333 / x) + -3.0);
} else {
tmp = Math.sqrt((x * 9.0)) * y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -5.8e+78: tmp = y * (math.sqrt(x) * 3.0) elif y <= 1.4e+34: tmp = math.sqrt(x) * ((0.3333333333333333 / x) + -3.0) else: tmp = math.sqrt((x * 9.0)) * y return tmp
function code(x, y) tmp = 0.0 if (y <= -5.8e+78) tmp = Float64(y * Float64(sqrt(x) * 3.0)); elseif (y <= 1.4e+34) tmp = Float64(sqrt(x) * Float64(Float64(0.3333333333333333 / 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 (y <= -5.8e+78) tmp = y * (sqrt(x) * 3.0); elseif (y <= 1.4e+34) tmp = sqrt(x) * ((0.3333333333333333 / x) + -3.0); else tmp = sqrt((x * 9.0)) * y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -5.8e+78], N[(y * N[(N[Sqrt[x], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e+34], N[(N[Sqrt[x], $MachinePrecision] * N[(N[(0.3333333333333333 / x), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision] * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+78}:\\
\;\;\;\;y \cdot \left(\sqrt{x} \cdot 3\right)\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+34}:\\
\;\;\;\;\sqrt{x} \cdot \left(\frac{0.3333333333333333}{x} + -3\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x \cdot 9} \cdot y\\
\end{array}
\end{array}
if y < -5.80000000000000034e78Initial program 99.7%
sub-neg99.7%
+-commutative99.7%
associate-+l+99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 87.5%
if -5.80000000000000034e78 < y < 1.40000000000000004e34Initial program 99.3%
*-commutative99.3%
associate-*l*99.4%
associate--l+99.4%
distribute-lft-in99.4%
fma-define99.4%
sub-neg99.4%
+-commutative99.4%
distribute-lft-in99.4%
metadata-eval99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.3%
associate-*r/99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around 0 94.7%
sub-neg94.7%
metadata-eval94.7%
associate-*r/94.8%
metadata-eval94.8%
+-commutative94.8%
Simplified94.8%
if 1.40000000000000004e34 < y Initial program 99.6%
sub-neg99.6%
+-commutative99.6%
associate-+l+99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.6%
unpow1/299.7%
Simplified99.6%
Taylor expanded in y around inf 85.5%
Final simplification91.0%
(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.5%
sub-neg99.5%
+-commutative99.5%
associate-+l+99.5%
*-commutative99.5%
associate-/r*99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.5%
unpow1/299.6%
Simplified99.5%
(FPCore (x y) :precision binary64 (* (sqrt x) (+ (+ (* y 3.0) (/ 0.3333333333333333 x)) -3.0)))
double code(double x, double y) {
return sqrt(x) * (((y * 3.0) + (0.3333333333333333 / x)) + -3.0);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sqrt(x) * (((y * 3.0d0) + (0.3333333333333333d0 / x)) + (-3.0d0))
end function
public static double code(double x, double y) {
return Math.sqrt(x) * (((y * 3.0) + (0.3333333333333333 / x)) + -3.0);
}
def code(x, y): return math.sqrt(x) * (((y * 3.0) + (0.3333333333333333 / x)) + -3.0)
function code(x, y) return Float64(sqrt(x) * Float64(Float64(Float64(y * 3.0) + Float64(0.3333333333333333 / x)) + -3.0)) end
function tmp = code(x, y) tmp = sqrt(x) * (((y * 3.0) + (0.3333333333333333 / x)) + -3.0); end
code[x_, y_] := N[(N[Sqrt[x], $MachinePrecision] * N[(N[(N[(y * 3.0), $MachinePrecision] + N[(0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision] + -3.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\sqrt{x} \cdot \left(\left(y \cdot 3 + \frac{0.3333333333333333}{x}\right) + -3\right)
\end{array}
Initial program 99.5%
*-commutative99.5%
associate-*l*99.4%
associate--l+99.4%
distribute-lft-in99.4%
fma-define99.4%
sub-neg99.4%
+-commutative99.4%
distribute-lft-in99.4%
metadata-eval99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.3%
associate-*r/99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
fma-undefine99.4%
+-commutative99.4%
associate-+r+99.4%
Applied egg-rr99.4%
Final simplification99.4%
(FPCore (x y) :precision binary64 (if (<= x 0.088) (pow (* x 9.0) -0.5) (* (sqrt x) -3.0)))
double code(double x, double y) {
double tmp;
if (x <= 0.088) {
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 <= 0.088d0) 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 <= 0.088) {
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 <= 0.088: 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 <= 0.088) 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 <= 0.088) tmp = (x * 9.0) ^ -0.5; else tmp = sqrt(x) * -3.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.088], 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 0.088:\\
\;\;\;\;{\left(x \cdot 9\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\end{array}
\end{array}
if x < 0.087999999999999995Initial program 99.3%
*-commutative99.3%
associate-*l*99.3%
associate--l+99.3%
distribute-lft-in99.2%
fma-define99.3%
sub-neg99.3%
+-commutative99.3%
distribute-lft-in99.3%
metadata-eval99.3%
metadata-eval99.3%
*-commutative99.3%
associate-/r*99.2%
associate-*r/99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 68.4%
metadata-eval68.4%
sqrt-prod68.6%
metadata-eval68.6%
inv-pow68.6%
unpow-prod-down68.7%
*-commutative68.7%
sqrt-pow168.8%
metadata-eval68.8%
Applied egg-rr68.8%
if 0.087999999999999995 < x Initial program 99.6%
sub-neg99.6%
+-commutative99.6%
associate-+l+99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 98.3%
Taylor expanded in y around 0 44.1%
*-commutative44.1%
Simplified44.1%
(FPCore (x y) :precision binary64 (if (<= x 0.088) (sqrt (/ 0.1111111111111111 x)) (* (sqrt x) -3.0)))
double code(double x, double y) {
double tmp;
if (x <= 0.088) {
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 <= 0.088d0) 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 <= 0.088) {
tmp = Math.sqrt((0.1111111111111111 / x));
} else {
tmp = Math.sqrt(x) * -3.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.088: tmp = math.sqrt((0.1111111111111111 / x)) else: tmp = math.sqrt(x) * -3.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 0.088) 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 <= 0.088) tmp = sqrt((0.1111111111111111 / x)); else tmp = sqrt(x) * -3.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.088], 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 0.088:\\
\;\;\;\;\sqrt{\frac{0.1111111111111111}{x}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot -3\\
\end{array}
\end{array}
if x < 0.087999999999999995Initial program 99.3%
*-commutative99.3%
associate-*l*99.3%
associate--l+99.3%
distribute-lft-in99.2%
fma-define99.3%
sub-neg99.3%
+-commutative99.3%
distribute-lft-in99.3%
metadata-eval99.3%
metadata-eval99.3%
*-commutative99.3%
associate-/r*99.2%
associate-*r/99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 68.4%
metadata-eval68.4%
sqrt-prod68.6%
div-inv68.6%
pow1/268.6%
Applied egg-rr68.6%
unpow1/268.6%
Simplified68.6%
if 0.087999999999999995 < x Initial program 99.6%
sub-neg99.6%
+-commutative99.6%
associate-+l+99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 98.3%
Taylor expanded in y around 0 44.1%
*-commutative44.1%
Simplified44.1%
(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.5%
*-commutative99.5%
associate-*l*99.4%
associate--l+99.4%
distribute-lft-in99.4%
fma-define99.4%
sub-neg99.4%
+-commutative99.4%
distribute-lft-in99.4%
metadata-eval99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.3%
associate-*r/99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 38.0%
metadata-eval38.0%
sqrt-prod38.1%
div-inv38.1%
pow1/238.1%
Applied egg-rr38.1%
unpow1/238.1%
Simplified38.1%
(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 2024091
(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)))