
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (1.0d0 / (x * 9.0d0))) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(1.0 / Float64(x * 9.0))) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (1.0d0 / (x * 9.0d0))) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(1.0 / Float64(x * 9.0))) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (1.0 / (x * 9.0))) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{1}{x \cdot 9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
(FPCore (x y) :precision binary64 (- (+ 1.0 (/ -1.0 (* x 9.0))) (/ y (sqrt (* x 9.0)))))
double code(double x, double y) {
return (1.0 + (-1.0 / (x * 9.0))) - (y / sqrt((x * 9.0)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 + ((-1.0d0) / (x * 9.0d0))) - (y / sqrt((x * 9.0d0)))
end function
public static double code(double x, double y) {
return (1.0 + (-1.0 / (x * 9.0))) - (y / Math.sqrt((x * 9.0)));
}
def code(x, y): return (1.0 + (-1.0 / (x * 9.0))) - (y / math.sqrt((x * 9.0)))
function code(x, y) return Float64(Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))) - Float64(y / sqrt(Float64(x * 9.0)))) end
function tmp = code(x, y) tmp = (1.0 + (-1.0 / (x * 9.0))) - (y / sqrt((x * 9.0))); end
code[x_, y_] := N[(N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 + \frac{-1}{x \cdot 9}\right) - \frac{y}{\sqrt{x \cdot 9}}
\end{array}
Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y) :precision binary64 (if (or (<= y -2.6e+62) (not (<= y 4.4e+70))) (- 1.0 (* y (sqrt (/ 0.1111111111111111 x)))) (+ 1.0 (/ -0.1111111111111111 x))))
double code(double x, double y) {
double tmp;
if ((y <= -2.6e+62) || !(y <= 4.4e+70)) {
tmp = 1.0 - (y * sqrt((0.1111111111111111 / x)));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-2.6d+62)) .or. (.not. (y <= 4.4d+70))) then
tmp = 1.0d0 - (y * sqrt((0.1111111111111111d0 / x)))
else
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -2.6e+62) || !(y <= 4.4e+70)) {
tmp = 1.0 - (y * Math.sqrt((0.1111111111111111 / x)));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -2.6e+62) or not (y <= 4.4e+70): tmp = 1.0 - (y * math.sqrt((0.1111111111111111 / x))) else: tmp = 1.0 + (-0.1111111111111111 / x) return tmp
function code(x, y) tmp = 0.0 if ((y <= -2.6e+62) || !(y <= 4.4e+70)) tmp = Float64(1.0 - Float64(y * sqrt(Float64(0.1111111111111111 / x)))); else tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -2.6e+62) || ~((y <= 4.4e+70))) tmp = 1.0 - (y * sqrt((0.1111111111111111 / x))); else tmp = 1.0 + (-0.1111111111111111 / x); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -2.6e+62], N[Not[LessEqual[y, 4.4e+70]], $MachinePrecision]], N[(1.0 - N[(y * N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{+62} \lor \neg \left(y \leq 4.4 \cdot 10^{+70}\right):\\
\;\;\;\;1 - y \cdot \sqrt{\frac{0.1111111111111111}{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\end{array}
\end{array}
if y < -2.59999999999999984e62 or 4.40000000000000001e70 < y Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
div-inv99.5%
metadata-eval99.5%
sqrt-div99.7%
inv-pow99.7%
*-commutative99.7%
unpow-prod-down99.5%
metadata-eval99.5%
metadata-eval99.5%
inv-pow99.5%
add-sqr-sqrt99.4%
sqrt-unprod69.0%
frac-times68.6%
metadata-eval68.6%
unpow268.6%
sqrt-prod68.7%
div-inv68.7%
sqrt-div69.1%
metadata-eval69.1%
unpow269.1%
sqrt-prod99.4%
add-sqr-sqrt99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 98.1%
if -2.59999999999999984e62 < y < 4.40000000000000001e70Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 96.0%
Final simplification96.7%
(FPCore (x y) :precision binary64 (if (or (<= y -2.95e+62) (not (<= y 2.3e+73))) (+ 1.0 (* -0.3333333333333333 (/ y (sqrt x)))) (+ 1.0 (/ -0.1111111111111111 x))))
double code(double x, double y) {
double tmp;
if ((y <= -2.95e+62) || !(y <= 2.3e+73)) {
tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x)));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-2.95d+62)) .or. (.not. (y <= 2.3d+73))) then
tmp = 1.0d0 + ((-0.3333333333333333d0) * (y / sqrt(x)))
else
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -2.95e+62) || !(y <= 2.3e+73)) {
tmp = 1.0 + (-0.3333333333333333 * (y / Math.sqrt(x)));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -2.95e+62) or not (y <= 2.3e+73): tmp = 1.0 + (-0.3333333333333333 * (y / math.sqrt(x))) else: tmp = 1.0 + (-0.1111111111111111 / x) return tmp
function code(x, y) tmp = 0.0 if ((y <= -2.95e+62) || !(y <= 2.3e+73)) tmp = Float64(1.0 + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))); else tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -2.95e+62) || ~((y <= 2.3e+73))) tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x))); else tmp = 1.0 + (-0.1111111111111111 / x); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -2.95e+62], N[Not[LessEqual[y, 2.3e+73]], $MachinePrecision]], N[(1.0 + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.95 \cdot 10^{+62} \lor \neg \left(y \leq 2.3 \cdot 10^{+73}\right):\\
\;\;\;\;1 + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\end{array}
\end{array}
if y < -2.9500000000000001e62 or 2.3e73 < y Initial program 99.6%
sub-neg99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
distribute-frac-neg99.6%
neg-mul-199.6%
times-frac99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 97.8%
if -2.9500000000000001e62 < y < 2.3e73Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 96.0%
Final simplification96.7%
(FPCore (x y)
:precision binary64
(if (<= y -2.6e+62)
(- 1.0 (* y (sqrt (/ 0.1111111111111111 x))))
(if (<= y 3.3e+75)
(+ 1.0 (/ -0.1111111111111111 x))
(- 1.0 (/ y (sqrt (* x 9.0)))))))
double code(double x, double y) {
double tmp;
if (y <= -2.6e+62) {
tmp = 1.0 - (y * sqrt((0.1111111111111111 / x)));
} else if (y <= 3.3e+75) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = 1.0 - (y / sqrt((x * 9.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.6d+62)) then
tmp = 1.0d0 - (y * sqrt((0.1111111111111111d0 / x)))
else if (y <= 3.3d+75) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = 1.0d0 - (y / sqrt((x * 9.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -2.6e+62) {
tmp = 1.0 - (y * Math.sqrt((0.1111111111111111 / x)));
} else if (y <= 3.3e+75) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = 1.0 - (y / Math.sqrt((x * 9.0)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -2.6e+62: tmp = 1.0 - (y * math.sqrt((0.1111111111111111 / x))) elif y <= 3.3e+75: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = 1.0 - (y / math.sqrt((x * 9.0))) return tmp
function code(x, y) tmp = 0.0 if (y <= -2.6e+62) tmp = Float64(1.0 - Float64(y * sqrt(Float64(0.1111111111111111 / x)))); elseif (y <= 3.3e+75) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(1.0 - Float64(y / sqrt(Float64(x * 9.0)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -2.6e+62) tmp = 1.0 - (y * sqrt((0.1111111111111111 / x))); elseif (y <= 3.3e+75) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = 1.0 - (y / sqrt((x * 9.0))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -2.6e+62], N[(1.0 - N[(y * N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e+75], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{+62}:\\
\;\;\;\;1 - y \cdot \sqrt{\frac{0.1111111111111111}{x}}\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{+75}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{y}{\sqrt{x \cdot 9}}\\
\end{array}
\end{array}
if y < -2.59999999999999984e62Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
div-inv99.5%
metadata-eval99.5%
sqrt-div99.7%
inv-pow99.7%
*-commutative99.7%
unpow-prod-down99.6%
metadata-eval99.6%
metadata-eval99.6%
inv-pow99.6%
add-sqr-sqrt99.5%
sqrt-unprod72.1%
frac-times72.1%
metadata-eval72.1%
unpow272.1%
sqrt-prod72.1%
div-inv72.2%
sqrt-div72.1%
metadata-eval72.1%
unpow272.1%
sqrt-prod99.4%
add-sqr-sqrt99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 99.3%
if -2.59999999999999984e62 < y < 3.29999999999999998e75Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 96.0%
if 3.29999999999999998e75 < y Initial program 99.5%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
Taylor expanded in x around inf 97.2%
(FPCore (x y)
:precision binary64
(if (<= y -7.5e+84)
(/ (* y -0.3333333333333333) (sqrt x))
(if (<= y 7.5e+78)
(+ 1.0 (/ -0.1111111111111111 x))
(* y (* -0.3333333333333333 (sqrt (/ 1.0 x)))))))
double code(double x, double y) {
double tmp;
if (y <= -7.5e+84) {
tmp = (y * -0.3333333333333333) / sqrt(x);
} else if (y <= 7.5e+78) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = y * (-0.3333333333333333 * sqrt((1.0 / x)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-7.5d+84)) then
tmp = (y * (-0.3333333333333333d0)) / sqrt(x)
else if (y <= 7.5d+78) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = y * ((-0.3333333333333333d0) * sqrt((1.0d0 / x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -7.5e+84) {
tmp = (y * -0.3333333333333333) / Math.sqrt(x);
} else if (y <= 7.5e+78) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = y * (-0.3333333333333333 * Math.sqrt((1.0 / x)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -7.5e+84: tmp = (y * -0.3333333333333333) / math.sqrt(x) elif y <= 7.5e+78: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = y * (-0.3333333333333333 * math.sqrt((1.0 / x))) return tmp
function code(x, y) tmp = 0.0 if (y <= -7.5e+84) tmp = Float64(Float64(y * -0.3333333333333333) / sqrt(x)); elseif (y <= 7.5e+78) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(y * Float64(-0.3333333333333333 * sqrt(Float64(1.0 / x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -7.5e+84) tmp = (y * -0.3333333333333333) / sqrt(x); elseif (y <= 7.5e+78) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = y * (-0.3333333333333333 * sqrt((1.0 / x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -7.5e+84], N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.5e+78], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(y * N[(-0.3333333333333333 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+84}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+78}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-0.3333333333333333 \cdot \sqrt{\frac{1}{x}}\right)\\
\end{array}
\end{array}
if y < -7.5000000000000001e84Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in y around inf 94.3%
associate-*r*94.2%
sqrt-div94.2%
metadata-eval94.2%
div-inv94.4%
associate-/r/94.3%
clear-num94.3%
div-inv94.3%
metadata-eval94.3%
Applied egg-rr94.3%
*-commutative94.3%
associate-/r*94.3%
metadata-eval94.3%
associate-/r/94.4%
*-commutative94.4%
associate-*r/94.4%
Simplified94.4%
if -7.5000000000000001e84 < y < 7.49999999999999934e78Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 94.9%
if 7.49999999999999934e78 < y Initial program 99.5%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in y around inf 93.8%
associate-*r*93.8%
*-commutative93.8%
Simplified93.8%
Final simplification94.6%
(FPCore (x y) :precision binary64 (if (or (<= y -5.8e+85) (not (<= y 3.5e+80))) (* -0.3333333333333333 (/ y (sqrt x))) (+ 1.0 (/ -0.1111111111111111 x))))
double code(double x, double y) {
double tmp;
if ((y <= -5.8e+85) || !(y <= 3.5e+80)) {
tmp = -0.3333333333333333 * (y / sqrt(x));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
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+85)) .or. (.not. (y <= 3.5d+80))) then
tmp = (-0.3333333333333333d0) * (y / sqrt(x))
else
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -5.8e+85) || !(y <= 3.5e+80)) {
tmp = -0.3333333333333333 * (y / Math.sqrt(x));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -5.8e+85) or not (y <= 3.5e+80): tmp = -0.3333333333333333 * (y / math.sqrt(x)) else: tmp = 1.0 + (-0.1111111111111111 / x) return tmp
function code(x, y) tmp = 0.0 if ((y <= -5.8e+85) || !(y <= 3.5e+80)) tmp = Float64(-0.3333333333333333 * Float64(y / sqrt(x))); else tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -5.8e+85) || ~((y <= 3.5e+80))) tmp = -0.3333333333333333 * (y / sqrt(x)); else tmp = 1.0 + (-0.1111111111111111 / x); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -5.8e+85], N[Not[LessEqual[y, 3.5e+80]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+85} \lor \neg \left(y \leq 3.5 \cdot 10^{+80}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\end{array}
\end{array}
if y < -5.79999999999999995e85 or 3.49999999999999994e80 < y Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in y around inf 94.0%
*-commutative94.0%
sqrt-div93.9%
metadata-eval93.9%
div-inv94.0%
clear-num94.0%
Applied egg-rr94.0%
associate-/r/93.9%
associate-*l/94.0%
*-lft-identity94.0%
Simplified94.0%
if -5.79999999999999995e85 < y < 3.49999999999999994e80Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 94.9%
Final simplification94.6%
(FPCore (x y)
:precision binary64
(if (<= y -2.1e+83)
(/ (* y -0.3333333333333333) (sqrt x))
(if (<= y 4.4e+76)
(+ 1.0 (/ -0.1111111111111111 x))
(* -0.3333333333333333 (/ y (sqrt x))))))
double code(double x, double y) {
double tmp;
if (y <= -2.1e+83) {
tmp = (y * -0.3333333333333333) / sqrt(x);
} else if (y <= 4.4e+76) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = -0.3333333333333333 * (y / sqrt(x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-2.1d+83)) then
tmp = (y * (-0.3333333333333333d0)) / sqrt(x)
else if (y <= 4.4d+76) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = (-0.3333333333333333d0) * (y / sqrt(x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -2.1e+83) {
tmp = (y * -0.3333333333333333) / Math.sqrt(x);
} else if (y <= 4.4e+76) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = -0.3333333333333333 * (y / Math.sqrt(x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -2.1e+83: tmp = (y * -0.3333333333333333) / math.sqrt(x) elif y <= 4.4e+76: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = -0.3333333333333333 * (y / math.sqrt(x)) return tmp
function code(x, y) tmp = 0.0 if (y <= -2.1e+83) tmp = Float64(Float64(y * -0.3333333333333333) / sqrt(x)); elseif (y <= 4.4e+76) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(-0.3333333333333333 * Float64(y / sqrt(x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -2.1e+83) tmp = (y * -0.3333333333333333) / sqrt(x); elseif (y <= 4.4e+76) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = -0.3333333333333333 * (y / sqrt(x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -2.1e+83], N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.4e+76], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{+83}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{+76}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -2.10000000000000002e83Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in y around inf 94.3%
associate-*r*94.2%
sqrt-div94.2%
metadata-eval94.2%
div-inv94.4%
associate-/r/94.3%
clear-num94.3%
div-inv94.3%
metadata-eval94.3%
Applied egg-rr94.3%
*-commutative94.3%
associate-/r*94.3%
metadata-eval94.3%
associate-/r/94.4%
*-commutative94.4%
associate-*r/94.4%
Simplified94.4%
if -2.10000000000000002e83 < y < 4.4000000000000001e76Initial program 99.8%
associate--l-99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
distribute-frac-neg99.8%
sub-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 94.9%
if 4.4000000000000001e76 < y Initial program 99.5%
*-commutative99.5%
metadata-eval99.5%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in y around inf 93.8%
*-commutative93.8%
sqrt-div93.8%
metadata-eval93.8%
div-inv93.8%
clear-num93.7%
Applied egg-rr93.7%
associate-/r/93.8%
associate-*l/93.8%
*-lft-identity93.8%
Simplified93.8%
(FPCore (x y) :precision binary64 (if (<= x 0.0005) (/ (- (* y (* (sqrt x) (- 0.3333333333333333))) 0.1111111111111111) x) (- 1.0 (/ y (sqrt (* x 9.0))))))
double code(double x, double y) {
double tmp;
if (x <= 0.0005) {
tmp = ((y * (sqrt(x) * -0.3333333333333333)) - 0.1111111111111111) / x;
} else {
tmp = 1.0 - (y / sqrt((x * 9.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.0005d0) then
tmp = ((y * (sqrt(x) * -0.3333333333333333d0)) - 0.1111111111111111d0) / x
else
tmp = 1.0d0 - (y / sqrt((x * 9.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.0005) {
tmp = ((y * (Math.sqrt(x) * -0.3333333333333333)) - 0.1111111111111111) / x;
} else {
tmp = 1.0 - (y / Math.sqrt((x * 9.0)));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.0005: tmp = ((y * (math.sqrt(x) * -0.3333333333333333)) - 0.1111111111111111) / x else: tmp = 1.0 - (y / math.sqrt((x * 9.0))) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.0005) tmp = Float64(Float64(Float64(y * Float64(sqrt(x) * Float64(-0.3333333333333333))) - 0.1111111111111111) / x); else tmp = Float64(1.0 - Float64(y / sqrt(Float64(x * 9.0)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.0005) tmp = ((y * (sqrt(x) * -0.3333333333333333)) - 0.1111111111111111) / x; else tmp = 1.0 - (y / sqrt((x * 9.0))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.0005], N[(N[(N[(y * N[(N[Sqrt[x], $MachinePrecision] * (-0.3333333333333333)), $MachinePrecision]), $MachinePrecision] - 0.1111111111111111), $MachinePrecision] / x), $MachinePrecision], N[(1.0 - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.0005:\\
\;\;\;\;\frac{y \cdot \left(\sqrt{x} \cdot \left(-0.3333333333333333\right)\right) - 0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{y}{\sqrt{x \cdot 9}}\\
\end{array}
\end{array}
if x < 5.0000000000000001e-4Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
Taylor expanded in x around 0 99.5%
Taylor expanded in x around 0 99.1%
mul-1-neg99.1%
associate-*r*99.1%
Simplified99.1%
if 5.0000000000000001e-4 < x Initial program 99.8%
*-commutative99.8%
metadata-eval99.8%
sqrt-prod99.9%
pow1/299.9%
Applied egg-rr99.9%
unpow1/299.9%
Simplified99.9%
Taylor expanded in x around 0 99.9%
Taylor expanded in x around inf 99.5%
Final simplification99.3%
(FPCore (x y) :precision binary64 (if (<= x 0.0005) (/ (+ 0.1111111111111111 (* (sqrt x) (* y 0.3333333333333333))) (- x)) (- 1.0 (/ y (sqrt (* x 9.0))))))
double code(double x, double y) {
double tmp;
if (x <= 0.0005) {
tmp = (0.1111111111111111 + (sqrt(x) * (y * 0.3333333333333333))) / -x;
} else {
tmp = 1.0 - (y / sqrt((x * 9.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.0005d0) then
tmp = (0.1111111111111111d0 + (sqrt(x) * (y * 0.3333333333333333d0))) / -x
else
tmp = 1.0d0 - (y / sqrt((x * 9.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.0005) {
tmp = (0.1111111111111111 + (Math.sqrt(x) * (y * 0.3333333333333333))) / -x;
} else {
tmp = 1.0 - (y / Math.sqrt((x * 9.0)));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.0005: tmp = (0.1111111111111111 + (math.sqrt(x) * (y * 0.3333333333333333))) / -x else: tmp = 1.0 - (y / math.sqrt((x * 9.0))) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.0005) tmp = Float64(Float64(0.1111111111111111 + Float64(sqrt(x) * Float64(y * 0.3333333333333333))) / Float64(-x)); else tmp = Float64(1.0 - Float64(y / sqrt(Float64(x * 9.0)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.0005) tmp = (0.1111111111111111 + (sqrt(x) * (y * 0.3333333333333333))) / -x; else tmp = 1.0 - (y / sqrt((x * 9.0))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.0005], N[(N[(0.1111111111111111 + N[(N[Sqrt[x], $MachinePrecision] * N[(y * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-x)), $MachinePrecision], N[(1.0 - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.0005:\\
\;\;\;\;\frac{0.1111111111111111 + \sqrt{x} \cdot \left(y \cdot 0.3333333333333333\right)}{-x}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{y}{\sqrt{x \cdot 9}}\\
\end{array}
\end{array}
if x < 5.0000000000000001e-4Initial program 99.6%
Taylor expanded in x around 0 99.1%
mul-1-neg99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in y around 0 99.1%
*-commutative99.1%
associate-*r*99.1%
Simplified99.1%
if 5.0000000000000001e-4 < x Initial program 99.8%
*-commutative99.8%
metadata-eval99.8%
sqrt-prod99.9%
pow1/299.9%
Applied egg-rr99.9%
unpow1/299.9%
Simplified99.9%
Taylor expanded in x around 0 99.9%
Taylor expanded in x around inf 99.5%
Final simplification99.3%
(FPCore (x y) :precision binary64 (if (<= x 0.0005) (+ (* -0.3333333333333333 (/ y (sqrt x))) (/ -0.1111111111111111 x)) (- 1.0 (/ y (sqrt (* x 9.0))))))
double code(double x, double y) {
double tmp;
if (x <= 0.0005) {
tmp = (-0.3333333333333333 * (y / sqrt(x))) + (-0.1111111111111111 / x);
} else {
tmp = 1.0 - (y / sqrt((x * 9.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.0005d0) then
tmp = ((-0.3333333333333333d0) * (y / sqrt(x))) + ((-0.1111111111111111d0) / x)
else
tmp = 1.0d0 - (y / sqrt((x * 9.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.0005) {
tmp = (-0.3333333333333333 * (y / Math.sqrt(x))) + (-0.1111111111111111 / x);
} else {
tmp = 1.0 - (y / Math.sqrt((x * 9.0)));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.0005: tmp = (-0.3333333333333333 * (y / math.sqrt(x))) + (-0.1111111111111111 / x) else: tmp = 1.0 - (y / math.sqrt((x * 9.0))) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.0005) tmp = Float64(Float64(-0.3333333333333333 * Float64(y / sqrt(x))) + Float64(-0.1111111111111111 / x)); else tmp = Float64(1.0 - Float64(y / sqrt(Float64(x * 9.0)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.0005) tmp = (-0.3333333333333333 * (y / sqrt(x))) + (-0.1111111111111111 / x); else tmp = 1.0 - (y / sqrt((x * 9.0))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.0005], N[(N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.0005:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}} + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{y}{\sqrt{x \cdot 9}}\\
\end{array}
\end{array}
if x < 5.0000000000000001e-4Initial program 99.6%
sub-neg99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
distribute-frac-neg99.6%
neg-mul-199.6%
times-frac99.4%
metadata-eval99.4%
Simplified99.4%
div-inv99.3%
cancel-sign-sub-inv99.3%
metadata-eval99.3%
div-inv99.4%
+-commutative99.4%
flip-+59.6%
frac-times59.5%
metadata-eval59.5%
pow259.5%
metadata-eval59.5%
Applied egg-rr59.5%
Taylor expanded in x around 0 99.1%
if 5.0000000000000001e-4 < x Initial program 99.8%
*-commutative99.8%
metadata-eval99.8%
sqrt-prod99.9%
pow1/299.9%
Applied egg-rr99.9%
unpow1/299.9%
Simplified99.9%
Taylor expanded in x around 0 99.9%
Taylor expanded in x around inf 99.5%
Final simplification99.3%
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 0.1111111111111111 x)) (/ y (sqrt (* x 9.0)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / sqrt((x * 9.0)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) - (y / sqrt((x * 9.0d0)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / Math.sqrt((x * 9.0)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) - (y / math.sqrt((x * 9.0)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) - Float64(y / sqrt(Float64(x * 9.0)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) - (y / sqrt((x * 9.0))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) - \frac{y}{\sqrt{x \cdot 9}}
\end{array}
Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
(FPCore (x y) :precision binary64 (- 1.0 (+ (/ 0.1111111111111111 x) (* y (sqrt (/ 0.1111111111111111 x))))))
double code(double x, double y) {
return 1.0 - ((0.1111111111111111 / x) + (y * sqrt((0.1111111111111111 / x))));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 - ((0.1111111111111111d0 / x) + (y * sqrt((0.1111111111111111d0 / x))))
end function
public static double code(double x, double y) {
return 1.0 - ((0.1111111111111111 / x) + (y * Math.sqrt((0.1111111111111111 / x))));
}
def code(x, y): return 1.0 - ((0.1111111111111111 / x) + (y * math.sqrt((0.1111111111111111 / x))))
function code(x, y) return Float64(1.0 - Float64(Float64(0.1111111111111111 / x) + Float64(y * sqrt(Float64(0.1111111111111111 / x))))) end
function tmp = code(x, y) tmp = 1.0 - ((0.1111111111111111 / x) + (y * sqrt((0.1111111111111111 / x)))); end
code[x_, y_] := N[(1.0 - N[(N[(0.1111111111111111 / x), $MachinePrecision] + N[(y * N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - \left(\frac{0.1111111111111111}{x} + y \cdot \sqrt{\frac{0.1111111111111111}{x}}\right)
\end{array}
Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
sub-neg99.7%
inv-pow99.7%
*-commutative99.7%
unpow-prod-down99.7%
metadata-eval99.7%
metadata-eval99.7%
inv-pow99.7%
add-sqr-sqrt99.6%
sqrt-unprod81.4%
frac-times81.4%
metadata-eval81.4%
unpow281.4%
sqrt-prod81.5%
div-inv81.9%
sqrt-div82.3%
metadata-eval82.3%
unpow282.3%
sqrt-prod99.6%
add-sqr-sqrt99.7%
div-inv99.6%
metadata-eval99.6%
sqrt-div99.7%
Applied egg-rr99.7%
sub-neg99.7%
associate--l-99.7%
Simplified99.7%
(FPCore (x y) :precision binary64 (+ (- 1.0 (/ 0.1111111111111111 x)) (* -0.3333333333333333 (/ y (sqrt x)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) + ((-0.3333333333333333d0) * (y / sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / Math.sqrt(x)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}
\end{array}
Initial program 99.7%
sub-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
(FPCore (x y) :precision binary64 (if (<= x 0.112) (/ -0.1111111111111111 x) 1.0))
double code(double x, double y) {
double tmp;
if (x <= 0.112) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 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 <= 0.112d0) then
tmp = (-0.1111111111111111d0) / x
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.112) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.112: tmp = -0.1111111111111111 / x else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 0.112) tmp = Float64(-0.1111111111111111 / x); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.112) tmp = -0.1111111111111111 / x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.112], N[(-0.1111111111111111 / x), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.112:\\
\;\;\;\;\frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < 0.112000000000000002Initial program 99.6%
Taylor expanded in x around 0 99.1%
mul-1-neg99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in y around 0 64.0%
Taylor expanded in x around 0 64.0%
if 0.112000000000000002 < x Initial program 99.8%
sub-neg99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
times-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 99.4%
Taylor expanded in y around 0 62.7%
(FPCore (x y) :precision binary64 (+ 1.0 (/ -0.1111111111111111 x)))
double code(double x, double y) {
return 1.0 + (-0.1111111111111111 / x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + ((-0.1111111111111111d0) / x)
end function
public static double code(double x, double y) {
return 1.0 + (-0.1111111111111111 / x);
}
def code(x, y): return 1.0 + (-0.1111111111111111 / x)
function code(x, y) return Float64(1.0 + Float64(-0.1111111111111111 / x)) end
function tmp = code(x, y) tmp = 1.0 + (-0.1111111111111111 / x); end
code[x_, y_] := N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{-0.1111111111111111}{x}
\end{array}
Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
fma-neg99.6%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 63.6%
(FPCore (x y) :precision binary64 1.0)
double code(double x, double y) {
return 1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0
end function
public static double code(double x, double y) {
return 1.0;
}
def code(x, y): return 1.0
function code(x, y) return 1.0 end
function tmp = code(x, y) tmp = 1.0; end
code[x_, y_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 99.7%
sub-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 70.6%
Taylor expanded in y around 0 35.0%
(FPCore (x y) :precision binary64 (- (- 1.0 (/ (/ 1.0 x) 9.0)) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - ((1.0d0 / x) / 9.0d0)) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(Float64(1.0 / x) / 9.0)) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(N[(1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{\frac{1}{x}}{9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
herbie shell --seed 2024135
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, D"
:precision binary64
:alt
(! :herbie-platform default (- (- 1 (/ (/ 1 x) 9)) (/ y (* 3 (sqrt x)))))
(- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))