
(FPCore (x y) :precision binary64 (sqrt (fabs (- x y))))
double code(double x, double y) {
return sqrt(fabs((x - y)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sqrt(abs((x - y)))
end function
public static double code(double x, double y) {
return Math.sqrt(Math.abs((x - y)));
}
def code(x, y): return math.sqrt(math.fabs((x - y)))
function code(x, y) return sqrt(abs(Float64(x - y))) end
function tmp = code(x, y) tmp = sqrt(abs((x - y))); end
code[x_, y_] := N[Sqrt[N[Abs[N[(x - y), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left|x - y\right|}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 9 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (sqrt (fabs (- x y))))
double code(double x, double y) {
return sqrt(fabs((x - y)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sqrt(abs((x - y)))
end function
public static double code(double x, double y) {
return Math.sqrt(Math.abs((x - y)));
}
def code(x, y): return math.sqrt(math.fabs((x - y)))
function code(x, y) return sqrt(abs(Float64(x - y))) end
function tmp = code(x, y) tmp = sqrt(abs((x - y))); end
code[x_, y_] := N[Sqrt[N[Abs[N[(x - y), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left|x - y\right|}
\end{array}
(FPCore (x y) :precision binary64 (sqrt (fabs (- x y))))
double code(double x, double y) {
return sqrt(fabs((x - y)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sqrt(abs((x - y)))
end function
public static double code(double x, double y) {
return Math.sqrt(Math.abs((x - y)));
}
def code(x, y): return math.sqrt(math.fabs((x - y)))
function code(x, y) return sqrt(abs(Float64(x - y))) end
function tmp = code(x, y) tmp = sqrt(abs((x - y))); end
code[x_, y_] := N[Sqrt[N[Abs[N[(x - y), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{\left|x - y\right|}
\end{array}
Initial program 100.0%
(FPCore (x y)
:precision binary64
(if (<= y 1.45e-201)
(sqrt (fabs x))
(if (<= y 6.7e-178)
(sqrt y)
(if (<= y 3.8e+124) (pow (/ (- x y) (/ 1.0 (- x y))) 0.25) (sqrt y)))))
double code(double x, double y) {
double tmp;
if (y <= 1.45e-201) {
tmp = sqrt(fabs(x));
} else if (y <= 6.7e-178) {
tmp = sqrt(y);
} else if (y <= 3.8e+124) {
tmp = pow(((x - y) / (1.0 / (x - y))), 0.25);
} else {
tmp = sqrt(y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 1.45d-201) then
tmp = sqrt(abs(x))
else if (y <= 6.7d-178) then
tmp = sqrt(y)
else if (y <= 3.8d+124) then
tmp = ((x - y) / (1.0d0 / (x - y))) ** 0.25d0
else
tmp = sqrt(y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 1.45e-201) {
tmp = Math.sqrt(Math.abs(x));
} else if (y <= 6.7e-178) {
tmp = Math.sqrt(y);
} else if (y <= 3.8e+124) {
tmp = Math.pow(((x - y) / (1.0 / (x - y))), 0.25);
} else {
tmp = Math.sqrt(y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1.45e-201: tmp = math.sqrt(math.fabs(x)) elif y <= 6.7e-178: tmp = math.sqrt(y) elif y <= 3.8e+124: tmp = math.pow(((x - y) / (1.0 / (x - y))), 0.25) else: tmp = math.sqrt(y) return tmp
function code(x, y) tmp = 0.0 if (y <= 1.45e-201) tmp = sqrt(abs(x)); elseif (y <= 6.7e-178) tmp = sqrt(y); elseif (y <= 3.8e+124) tmp = Float64(Float64(x - y) / Float64(1.0 / Float64(x - y))) ^ 0.25; else tmp = sqrt(y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 1.45e-201) tmp = sqrt(abs(x)); elseif (y <= 6.7e-178) tmp = sqrt(y); elseif (y <= 3.8e+124) tmp = ((x - y) / (1.0 / (x - y))) ^ 0.25; else tmp = sqrt(y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 1.45e-201], N[Sqrt[N[Abs[x], $MachinePrecision]], $MachinePrecision], If[LessEqual[y, 6.7e-178], N[Sqrt[y], $MachinePrecision], If[LessEqual[y, 3.8e+124], N[Power[N[(N[(x - y), $MachinePrecision] / N[(1.0 / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.25], $MachinePrecision], N[Sqrt[y], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.45 \cdot 10^{-201}:\\
\;\;\;\;\sqrt{\left|x\right|}\\
\mathbf{elif}\;y \leq 6.7 \cdot 10^{-178}:\\
\;\;\;\;\sqrt{y}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+124}:\\
\;\;\;\;{\left(\frac{x - y}{\frac{1}{x - y}}\right)}^{0.25}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{y}\\
\end{array}
\end{array}
if y < 1.4500000000000001e-201Initial program 100.0%
Taylor expanded in x around inf
Simplified60.1%
if 1.4500000000000001e-201 < y < 6.7000000000000004e-178 or 3.7999999999999998e124 < y Initial program 100.0%
pow1/2N/A
sqr-powN/A
pow-prod-downN/A
sqr-absN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
metadata-eval16.9%
Applied egg-rr16.9%
Taylor expanded in x around 0
unpow2N/A
*-lowering-*.f6413.9%
Simplified13.9%
pow2N/A
pow-powN/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f6480.8%
Applied egg-rr80.8%
if 6.7000000000000004e-178 < y < 3.7999999999999998e124Initial program 100.0%
pow1/2N/A
sqr-powN/A
pow-prod-downN/A
sqr-absN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
metadata-eval72.3%
Applied egg-rr72.3%
flip--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
--lowering--.f6472.3%
Applied egg-rr72.3%
(FPCore (x y) :precision binary64 (if (<= (- x y) -1.6e+154) (sqrt y) (if (<= (- x y) -2e-161) (pow (/ (- x y) (/ 1.0 (- x y))) 0.25) (sqrt y))))
double code(double x, double y) {
double tmp;
if ((x - y) <= -1.6e+154) {
tmp = sqrt(y);
} else if ((x - y) <= -2e-161) {
tmp = pow(((x - y) / (1.0 / (x - y))), 0.25);
} else {
tmp = sqrt(y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((x - y) <= (-1.6d+154)) then
tmp = sqrt(y)
else if ((x - y) <= (-2d-161)) then
tmp = ((x - y) / (1.0d0 / (x - y))) ** 0.25d0
else
tmp = sqrt(y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((x - y) <= -1.6e+154) {
tmp = Math.sqrt(y);
} else if ((x - y) <= -2e-161) {
tmp = Math.pow(((x - y) / (1.0 / (x - y))), 0.25);
} else {
tmp = Math.sqrt(y);
}
return tmp;
}
def code(x, y): tmp = 0 if (x - y) <= -1.6e+154: tmp = math.sqrt(y) elif (x - y) <= -2e-161: tmp = math.pow(((x - y) / (1.0 / (x - y))), 0.25) else: tmp = math.sqrt(y) return tmp
function code(x, y) tmp = 0.0 if (Float64(x - y) <= -1.6e+154) tmp = sqrt(y); elseif (Float64(x - y) <= -2e-161) tmp = Float64(Float64(x - y) / Float64(1.0 / Float64(x - y))) ^ 0.25; else tmp = sqrt(y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((x - y) <= -1.6e+154) tmp = sqrt(y); elseif ((x - y) <= -2e-161) tmp = ((x - y) / (1.0 / (x - y))) ^ 0.25; else tmp = sqrt(y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[N[(x - y), $MachinePrecision], -1.6e+154], N[Sqrt[y], $MachinePrecision], If[LessEqual[N[(x - y), $MachinePrecision], -2e-161], N[Power[N[(N[(x - y), $MachinePrecision] / N[(1.0 / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.25], $MachinePrecision], N[Sqrt[y], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x - y \leq -1.6 \cdot 10^{+154}:\\
\;\;\;\;\sqrt{y}\\
\mathbf{elif}\;x - y \leq -2 \cdot 10^{-161}:\\
\;\;\;\;{\left(\frac{x - y}{\frac{1}{x - y}}\right)}^{0.25}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{y}\\
\end{array}
\end{array}
if (-.f64 x y) < -1.6e154 or -2.00000000000000006e-161 < (-.f64 x y) Initial program 100.0%
pow1/2N/A
sqr-powN/A
pow-prod-downN/A
sqr-absN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
metadata-eval36.1%
Applied egg-rr36.1%
Taylor expanded in x around 0
unpow2N/A
*-lowering-*.f6419.9%
Simplified19.9%
pow2N/A
pow-powN/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f6412.4%
Applied egg-rr12.4%
if -1.6e154 < (-.f64 x y) < -2.00000000000000006e-161Initial program 100.0%
pow1/2N/A
sqr-powN/A
pow-prod-downN/A
sqr-absN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
metadata-eval98.5%
Applied egg-rr98.5%
flip--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
--lowering--.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
--lowering--.f6498.5%
Applied egg-rr98.5%
(FPCore (x y) :precision binary64 (if (<= (- x y) -1.6e+154) (sqrt y) (if (<= (- x y) -2e-161) (pow (* (- x y) (- x y)) 0.25) (sqrt y))))
double code(double x, double y) {
double tmp;
if ((x - y) <= -1.6e+154) {
tmp = sqrt(y);
} else if ((x - y) <= -2e-161) {
tmp = pow(((x - y) * (x - y)), 0.25);
} else {
tmp = sqrt(y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((x - y) <= (-1.6d+154)) then
tmp = sqrt(y)
else if ((x - y) <= (-2d-161)) then
tmp = ((x - y) * (x - y)) ** 0.25d0
else
tmp = sqrt(y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((x - y) <= -1.6e+154) {
tmp = Math.sqrt(y);
} else if ((x - y) <= -2e-161) {
tmp = Math.pow(((x - y) * (x - y)), 0.25);
} else {
tmp = Math.sqrt(y);
}
return tmp;
}
def code(x, y): tmp = 0 if (x - y) <= -1.6e+154: tmp = math.sqrt(y) elif (x - y) <= -2e-161: tmp = math.pow(((x - y) * (x - y)), 0.25) else: tmp = math.sqrt(y) return tmp
function code(x, y) tmp = 0.0 if (Float64(x - y) <= -1.6e+154) tmp = sqrt(y); elseif (Float64(x - y) <= -2e-161) tmp = Float64(Float64(x - y) * Float64(x - y)) ^ 0.25; else tmp = sqrt(y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((x - y) <= -1.6e+154) tmp = sqrt(y); elseif ((x - y) <= -2e-161) tmp = ((x - y) * (x - y)) ^ 0.25; else tmp = sqrt(y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[N[(x - y), $MachinePrecision], -1.6e+154], N[Sqrt[y], $MachinePrecision], If[LessEqual[N[(x - y), $MachinePrecision], -2e-161], N[Power[N[(N[(x - y), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], 0.25], $MachinePrecision], N[Sqrt[y], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x - y \leq -1.6 \cdot 10^{+154}:\\
\;\;\;\;\sqrt{y}\\
\mathbf{elif}\;x - y \leq -2 \cdot 10^{-161}:\\
\;\;\;\;{\left(\left(x - y\right) \cdot \left(x - y\right)\right)}^{0.25}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{y}\\
\end{array}
\end{array}
if (-.f64 x y) < -1.6e154 or -2.00000000000000006e-161 < (-.f64 x y) Initial program 100.0%
pow1/2N/A
sqr-powN/A
pow-prod-downN/A
sqr-absN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
metadata-eval36.1%
Applied egg-rr36.1%
Taylor expanded in x around 0
unpow2N/A
*-lowering-*.f6419.9%
Simplified19.9%
pow2N/A
pow-powN/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f6412.4%
Applied egg-rr12.4%
if -1.6e154 < (-.f64 x y) < -2.00000000000000006e-161Initial program 100.0%
pow1/2N/A
sqr-powN/A
pow-prod-downN/A
sqr-absN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
metadata-eval98.5%
Applied egg-rr98.5%
(FPCore (x y) :precision binary64 (if (<= y 8e-202) (pow (* x (+ x (* y -2.0))) 0.25) (sqrt y)))
double code(double x, double y) {
double tmp;
if (y <= 8e-202) {
tmp = pow((x * (x + (y * -2.0))), 0.25);
} else {
tmp = sqrt(y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 8d-202) then
tmp = (x * (x + (y * (-2.0d0)))) ** 0.25d0
else
tmp = sqrt(y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 8e-202) {
tmp = Math.pow((x * (x + (y * -2.0))), 0.25);
} else {
tmp = Math.sqrt(y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 8e-202: tmp = math.pow((x * (x + (y * -2.0))), 0.25) else: tmp = math.sqrt(y) return tmp
function code(x, y) tmp = 0.0 if (y <= 8e-202) tmp = Float64(x * Float64(x + Float64(y * -2.0))) ^ 0.25; else tmp = sqrt(y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 8e-202) tmp = (x * (x + (y * -2.0))) ^ 0.25; else tmp = sqrt(y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 8e-202], N[Power[N[(x * N[(x + N[(y * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.25], $MachinePrecision], N[Sqrt[y], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 8 \cdot 10^{-202}:\\
\;\;\;\;{\left(x \cdot \left(x + y \cdot -2\right)\right)}^{0.25}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{y}\\
\end{array}
\end{array}
if y < 8.0000000000000003e-202Initial program 100.0%
pow1/2N/A
sqr-powN/A
pow-prod-downN/A
sqr-absN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
metadata-eval52.5%
Applied egg-rr52.5%
Taylor expanded in x around inf
unpow2N/A
associate-*l*N/A
distribute-lft-inN/A
*-rgt-identityN/A
associate-*r/N/A
associate-*r/N/A
*-commutativeN/A
associate-*r*N/A
*-rgt-identityN/A
times-fracN/A
*-rgt-identityN/A
times-fracN/A
*-inversesN/A
/-rgt-identityN/A
*-lft-identityN/A
metadata-evalN/A
*-commutativeN/A
*-lowering-*.f64N/A
metadata-evalN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-lowering-+.f64N/A
Simplified33.2%
if 8.0000000000000003e-202 < y Initial program 100.0%
pow1/2N/A
sqr-powN/A
pow-prod-downN/A
sqr-absN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
metadata-eval53.6%
Applied egg-rr53.6%
Taylor expanded in x around 0
unpow2N/A
*-lowering-*.f6434.5%
Simplified34.5%
pow2N/A
pow-powN/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f6457.2%
Applied egg-rr57.2%
(FPCore (x y) :precision binary64 (if (<= y 1.45e-201) (pow (* x (- x y)) 0.25) (sqrt y)))
double code(double x, double y) {
double tmp;
if (y <= 1.45e-201) {
tmp = pow((x * (x - y)), 0.25);
} else {
tmp = sqrt(y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 1.45d-201) then
tmp = (x * (x - y)) ** 0.25d0
else
tmp = sqrt(y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 1.45e-201) {
tmp = Math.pow((x * (x - y)), 0.25);
} else {
tmp = Math.sqrt(y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1.45e-201: tmp = math.pow((x * (x - y)), 0.25) else: tmp = math.sqrt(y) return tmp
function code(x, y) tmp = 0.0 if (y <= 1.45e-201) tmp = Float64(x * Float64(x - y)) ^ 0.25; else tmp = sqrt(y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 1.45e-201) tmp = (x * (x - y)) ^ 0.25; else tmp = sqrt(y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 1.45e-201], N[Power[N[(x * N[(x - y), $MachinePrecision]), $MachinePrecision], 0.25], $MachinePrecision], N[Sqrt[y], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.45 \cdot 10^{-201}:\\
\;\;\;\;{\left(x \cdot \left(x - y\right)\right)}^{0.25}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{y}\\
\end{array}
\end{array}
if y < 1.4500000000000001e-201Initial program 100.0%
pow1/2N/A
sqr-powN/A
pow-prod-downN/A
sqr-absN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
metadata-eval52.5%
Applied egg-rr52.5%
Taylor expanded in x around inf
Simplified32.6%
if 1.4500000000000001e-201 < y Initial program 100.0%
pow1/2N/A
sqr-powN/A
pow-prod-downN/A
sqr-absN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
metadata-eval53.6%
Applied egg-rr53.6%
Taylor expanded in x around 0
unpow2N/A
*-lowering-*.f6434.5%
Simplified34.5%
pow2N/A
pow-powN/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f6457.2%
Applied egg-rr57.2%
Final simplification41.2%
(FPCore (x y) :precision binary64 (if (<= y 1.45e-201) (pow (* x x) 0.25) (sqrt y)))
double code(double x, double y) {
double tmp;
if (y <= 1.45e-201) {
tmp = pow((x * x), 0.25);
} else {
tmp = sqrt(y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 1.45d-201) then
tmp = (x * x) ** 0.25d0
else
tmp = sqrt(y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 1.45e-201) {
tmp = Math.pow((x * x), 0.25);
} else {
tmp = Math.sqrt(y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1.45e-201: tmp = math.pow((x * x), 0.25) else: tmp = math.sqrt(y) return tmp
function code(x, y) tmp = 0.0 if (y <= 1.45e-201) tmp = Float64(x * x) ^ 0.25; else tmp = sqrt(y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 1.45e-201) tmp = (x * x) ^ 0.25; else tmp = sqrt(y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 1.45e-201], N[Power[N[(x * x), $MachinePrecision], 0.25], $MachinePrecision], N[Sqrt[y], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.45 \cdot 10^{-201}:\\
\;\;\;\;{\left(x \cdot x\right)}^{0.25}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{y}\\
\end{array}
\end{array}
if y < 1.4500000000000001e-201Initial program 100.0%
pow1/2N/A
sqr-powN/A
pow-prod-downN/A
sqr-absN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
metadata-eval52.5%
Applied egg-rr52.5%
Taylor expanded in x around inf
unpow2N/A
*-lowering-*.f6433.2%
Simplified33.2%
if 1.4500000000000001e-201 < y Initial program 100.0%
pow1/2N/A
sqr-powN/A
pow-prod-downN/A
sqr-absN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
metadata-eval53.6%
Applied egg-rr53.6%
Taylor expanded in x around 0
unpow2N/A
*-lowering-*.f6434.5%
Simplified34.5%
pow2N/A
pow-powN/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f6457.2%
Applied egg-rr57.2%
(FPCore (x y) :precision binary64 (sqrt y))
double code(double x, double y) {
return sqrt(y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sqrt(y)
end function
public static double code(double x, double y) {
return Math.sqrt(y);
}
def code(x, y): return math.sqrt(y)
function code(x, y) return sqrt(y) end
function tmp = code(x, y) tmp = sqrt(y); end
code[x_, y_] := N[Sqrt[y], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{y}
\end{array}
Initial program 100.0%
pow1/2N/A
sqr-powN/A
pow-prod-downN/A
sqr-absN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
metadata-eval52.9%
Applied egg-rr52.9%
Taylor expanded in x around 0
unpow2N/A
*-lowering-*.f6426.1%
Simplified26.1%
pow2N/A
pow-powN/A
metadata-evalN/A
unpow1/2N/A
sqrt-lowering-sqrt.f6420.3%
Applied egg-rr20.3%
(FPCore (x y) :precision binary64 (sqrt x))
double code(double x, double y) {
return sqrt(x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sqrt(x)
end function
public static double code(double x, double y) {
return Math.sqrt(x);
}
def code(x, y): return math.sqrt(x)
function code(x, y) return sqrt(x) end
function tmp = code(x, y) tmp = sqrt(x); end
code[x_, y_] := N[Sqrt[x], $MachinePrecision]
\begin{array}{l}
\\
\sqrt{x}
\end{array}
Initial program 100.0%
pow1/2N/A
sqr-powN/A
pow-prod-downN/A
sqr-absN/A
pow-lowering-pow.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
--lowering--.f64N/A
metadata-eval52.9%
Applied egg-rr52.9%
Taylor expanded in x around inf
sqrt-lowering-sqrt.f6425.5%
Simplified25.5%
herbie shell --seed 2024161
(FPCore (x y)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, C"
:precision binary64
(sqrt (fabs (- x y))))