
(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 15 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))) (/ (* (pow x -0.5) y) 3.0)))
double code(double x, double y) {
return (1.0 + (-1.0 / (x * 9.0))) - ((pow(x, -0.5) * y) / 3.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))) - (((x ** (-0.5d0)) * y) / 3.0d0)
end function
public static double code(double x, double y) {
return (1.0 + (-1.0 / (x * 9.0))) - ((Math.pow(x, -0.5) * y) / 3.0);
}
def code(x, y): return (1.0 + (-1.0 / (x * 9.0))) - ((math.pow(x, -0.5) * y) / 3.0)
function code(x, y) return Float64(Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))) - Float64(Float64((x ^ -0.5) * y) / 3.0)) end
function tmp = code(x, y) tmp = (1.0 + (-1.0 / (x * 9.0))) - (((x ^ -0.5) * y) / 3.0); end
code[x_, y_] := N[(N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[Power[x, -0.5], $MachinePrecision] * y), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 + \frac{-1}{x \cdot 9}\right) - \frac{{x}^{-0.5} \cdot y}{3}
\end{array}
Initial program 99.6%
*-un-lft-identity99.6%
*-commutative99.6%
times-frac99.6%
pow1/299.6%
pow-flip99.6%
metadata-eval99.6%
Applied egg-rr99.6%
associate-*r/99.7%
Applied egg-rr99.7%
Final simplification99.7%
(FPCore (x y) :precision binary64 (- (+ 1.0 (/ -1.0 (* x 9.0))) (* (pow x -0.5) (/ y 3.0))))
double code(double x, double y) {
return (1.0 + (-1.0 / (x * 9.0))) - (pow(x, -0.5) * (y / 3.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))) - ((x ** (-0.5d0)) * (y / 3.0d0))
end function
public static double code(double x, double y) {
return (1.0 + (-1.0 / (x * 9.0))) - (Math.pow(x, -0.5) * (y / 3.0));
}
def code(x, y): return (1.0 + (-1.0 / (x * 9.0))) - (math.pow(x, -0.5) * (y / 3.0))
function code(x, y) return Float64(Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))) - Float64((x ^ -0.5) * Float64(y / 3.0))) end
function tmp = code(x, y) tmp = (1.0 + (-1.0 / (x * 9.0))) - ((x ^ -0.5) * (y / 3.0)); end
code[x_, y_] := N[(N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Power[x, -0.5], $MachinePrecision] * N[(y / 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 + \frac{-1}{x \cdot 9}\right) - {x}^{-0.5} \cdot \frac{y}{3}
\end{array}
Initial program 99.6%
*-un-lft-identity99.6%
*-commutative99.6%
times-frac99.6%
pow1/299.6%
pow-flip99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Final simplification99.6%
(FPCore (x y) :precision binary64 (+ (- 1.0 (/ 0.1111111111111111 x)) (* -0.3333333333333333 (* (pow x -0.5) y))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (pow(x, -0.5) * y));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) + ((-0.3333333333333333d0) * ((x ** (-0.5d0)) * y))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (Math.pow(x, -0.5) * y));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (math.pow(x, -0.5) * y))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) + Float64(-0.3333333333333333 * Float64((x ^ -0.5) * y))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * ((x ^ -0.5) * y)); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] + N[(-0.3333333333333333 * N[(N[Power[x, -0.5], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \left({x}^{-0.5} \cdot y\right)
\end{array}
Initial program 99.6%
sub-neg99.6%
distribute-frac-neg99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
neg-mul-199.6%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
div-inv99.6%
pow1/299.6%
pow-flip99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Final simplification99.6%
(FPCore (x y) :precision binary64 (- (- 1.0 (/ 0.1111111111111111 x)) (/ (* (pow x -0.5) y) 3.0)))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - ((pow(x, -0.5) * y) / 3.0);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) - (((x ** (-0.5d0)) * y) / 3.0d0)
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - ((Math.pow(x, -0.5) * y) / 3.0);
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) - ((math.pow(x, -0.5) * y) / 3.0)
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) - Float64(Float64((x ^ -0.5) * y) / 3.0)) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) - (((x ^ -0.5) * y) / 3.0); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] - N[(N[(N[Power[x, -0.5], $MachinePrecision] * y), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) - \frac{{x}^{-0.5} \cdot y}{3}
\end{array}
Initial program 99.6%
*-un-lft-identity99.6%
*-commutative99.6%
times-frac99.6%
pow1/299.6%
pow-flip99.6%
metadata-eval99.6%
Applied egg-rr99.6%
associate-*r/99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 99.6%
Final simplification99.6%
(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.6%
sub-neg99.6%
distribute-frac-neg99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
neg-mul-199.6%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y) :precision binary64 (+ (- 1.0 (/ 0.1111111111111111 x)) (/ (* y -0.3333333333333333) (sqrt x))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + ((y * -0.3333333333333333) / sqrt(x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) + ((y * (-0.3333333333333333d0)) / sqrt(x))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + ((y * -0.3333333333333333) / Math.sqrt(x));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) + ((y * -0.3333333333333333) / math.sqrt(x))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) + Float64(Float64(y * -0.3333333333333333) / sqrt(x))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) + ((y * -0.3333333333333333) / sqrt(x)); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) + \frac{y \cdot -0.3333333333333333}{\sqrt{x}}
\end{array}
Initial program 99.6%
sub-neg99.6%
distribute-frac-neg99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
neg-mul-199.6%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
associate-*r/99.6%
Applied egg-rr99.6%
Final simplification99.6%
(FPCore (x y) :precision binary64 (if (or (<= y -3.9e+84) (not (<= y 2.1e+56))) (/ (* (pow x -0.5) y) -3.0) (+ 1.0 (/ -0.1111111111111111 x))))
double code(double x, double y) {
double tmp;
if ((y <= -3.9e+84) || !(y <= 2.1e+56)) {
tmp = (pow(x, -0.5) * y) / -3.0;
} 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 <= (-3.9d+84)) .or. (.not. (y <= 2.1d+56))) then
tmp = ((x ** (-0.5d0)) * y) / (-3.0d0)
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 <= -3.9e+84) || !(y <= 2.1e+56)) {
tmp = (Math.pow(x, -0.5) * y) / -3.0;
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -3.9e+84) or not (y <= 2.1e+56): tmp = (math.pow(x, -0.5) * y) / -3.0 else: tmp = 1.0 + (-0.1111111111111111 / x) return tmp
function code(x, y) tmp = 0.0 if ((y <= -3.9e+84) || !(y <= 2.1e+56)) tmp = Float64(Float64((x ^ -0.5) * y) / -3.0); else tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -3.9e+84) || ~((y <= 2.1e+56))) tmp = ((x ^ -0.5) * y) / -3.0; else tmp = 1.0 + (-0.1111111111111111 / x); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -3.9e+84], N[Not[LessEqual[y, 2.1e+56]], $MachinePrecision]], N[(N[(N[Power[x, -0.5], $MachinePrecision] * y), $MachinePrecision] / -3.0), $MachinePrecision], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.9 \cdot 10^{+84} \lor \neg \left(y \leq 2.1 \cdot 10^{+56}\right):\\
\;\;\;\;\frac{{x}^{-0.5} \cdot y}{-3}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\end{array}
\end{array}
if y < -3.90000000000000016e84 or 2.10000000000000017e56 < y Initial program 99.5%
*-un-lft-identity99.5%
*-commutative99.5%
times-frac99.4%
pow1/299.4%
pow-flip99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 90.6%
*-commutative90.6%
Simplified90.6%
associate-*l*90.5%
inv-pow90.5%
sqrt-pow190.5%
metadata-eval90.5%
associate-*r*90.6%
metadata-eval90.6%
metadata-eval90.6%
distribute-rgt-neg-in90.6%
metadata-eval90.6%
metadata-eval90.6%
div-inv90.6%
associate-/l*90.5%
distribute-neg-frac90.5%
Applied egg-rr90.5%
metadata-eval90.5%
associate-/r*90.5%
neg-mul-190.5%
associate-/l*90.6%
*-commutative90.6%
distribute-rgt-neg-out90.6%
distribute-lft-neg-in90.6%
remove-double-neg90.6%
Simplified90.6%
if -3.90000000000000016e84 < y < 2.10000000000000017e56Initial program 99.7%
sub-neg99.7%
distribute-frac-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
neg-mul-199.7%
times-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 96.6%
cancel-sign-sub-inv96.6%
metadata-eval96.6%
associate-*r/96.7%
metadata-eval96.7%
Simplified96.7%
Final simplification94.2%
(FPCore (x y)
:precision binary64
(if (<= y -7.4e+77)
(/ (* y -0.3333333333333333) (sqrt x))
(if (<= y 4.4e+56)
(+ 1.0 (/ -0.1111111111111111 x))
(/ (/ (- y) (sqrt x)) 3.0))))
double code(double x, double y) {
double tmp;
if (y <= -7.4e+77) {
tmp = (y * -0.3333333333333333) / sqrt(x);
} else if (y <= 4.4e+56) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (-y / 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 (y <= (-7.4d+77)) then
tmp = (y * (-0.3333333333333333d0)) / sqrt(x)
else if (y <= 4.4d+56) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = (-y / sqrt(x)) / 3.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -7.4e+77) {
tmp = (y * -0.3333333333333333) / Math.sqrt(x);
} else if (y <= 4.4e+56) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (-y / Math.sqrt(x)) / 3.0;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -7.4e+77: tmp = (y * -0.3333333333333333) / math.sqrt(x) elif y <= 4.4e+56: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = (-y / math.sqrt(x)) / 3.0 return tmp
function code(x, y) tmp = 0.0 if (y <= -7.4e+77) tmp = Float64(Float64(y * -0.3333333333333333) / sqrt(x)); elseif (y <= 4.4e+56) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(Float64(Float64(-y) / sqrt(x)) / 3.0); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -7.4e+77) tmp = (y * -0.3333333333333333) / sqrt(x); elseif (y <= 4.4e+56) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = (-y / sqrt(x)) / 3.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -7.4e+77], N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.4e+56], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(N[((-y) / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.4 \cdot 10^{+77}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{+56}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{-y}{\sqrt{x}}}{3}\\
\end{array}
\end{array}
if y < -7.3999999999999999e77Initial program 99.4%
*-un-lft-identity99.4%
*-commutative99.4%
times-frac99.5%
pow1/299.5%
pow-flip99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 97.3%
*-commutative97.3%
Simplified97.3%
associate-*l*97.2%
sqrt-div97.1%
metadata-eval97.1%
associate-*l/97.3%
*-un-lft-identity97.3%
Applied egg-rr97.3%
if -7.3999999999999999e77 < y < 4.40000000000000032e56Initial program 99.7%
sub-neg99.7%
distribute-frac-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
neg-mul-199.7%
times-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 96.6%
cancel-sign-sub-inv96.6%
metadata-eval96.6%
associate-*r/96.7%
metadata-eval96.7%
Simplified96.7%
if 4.40000000000000032e56 < y Initial program 99.5%
*-un-lft-identity99.5%
*-commutative99.5%
times-frac99.4%
pow1/299.4%
pow-flip99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 85.4%
*-commutative85.4%
Simplified85.4%
associate-*l*85.3%
inv-pow85.3%
sqrt-pow185.3%
metadata-eval85.3%
associate-*r*85.4%
metadata-eval85.4%
metadata-eval85.4%
distribute-rgt-neg-in85.4%
metadata-eval85.4%
metadata-eval85.4%
div-inv85.4%
distribute-neg-frac85.4%
*-commutative85.4%
metadata-eval85.4%
sqrt-pow185.4%
inv-pow85.4%
sqrt-div85.3%
metadata-eval85.3%
un-div-inv85.4%
Applied egg-rr85.4%
Final simplification94.2%
(FPCore (x y)
:precision binary64
(if (<= y -6.2e+80)
(* -0.3333333333333333 (* y (sqrt (/ 1.0 x))))
(if (<= y 5.9e+55)
(+ 1.0 (/ -0.1111111111111111 x))
(/ (* (pow x -0.5) y) -3.0))))
double code(double x, double y) {
double tmp;
if (y <= -6.2e+80) {
tmp = -0.3333333333333333 * (y * sqrt((1.0 / x)));
} else if (y <= 5.9e+55) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (pow(x, -0.5) * y) / -3.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-6.2d+80)) then
tmp = (-0.3333333333333333d0) * (y * sqrt((1.0d0 / x)))
else if (y <= 5.9d+55) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = ((x ** (-0.5d0)) * y) / (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -6.2e+80) {
tmp = -0.3333333333333333 * (y * Math.sqrt((1.0 / x)));
} else if (y <= 5.9e+55) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (Math.pow(x, -0.5) * y) / -3.0;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -6.2e+80: tmp = -0.3333333333333333 * (y * math.sqrt((1.0 / x))) elif y <= 5.9e+55: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = (math.pow(x, -0.5) * y) / -3.0 return tmp
function code(x, y) tmp = 0.0 if (y <= -6.2e+80) tmp = Float64(-0.3333333333333333 * Float64(y * sqrt(Float64(1.0 / x)))); elseif (y <= 5.9e+55) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(Float64((x ^ -0.5) * y) / -3.0); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -6.2e+80) tmp = -0.3333333333333333 * (y * sqrt((1.0 / x))); elseif (y <= 5.9e+55) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = ((x ^ -0.5) * y) / -3.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -6.2e+80], N[(-0.3333333333333333 * N[(y * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.9e+55], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[x, -0.5], $MachinePrecision] * y), $MachinePrecision] / -3.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+80}:\\
\;\;\;\;-0.3333333333333333 \cdot \left(y \cdot \sqrt{\frac{1}{x}}\right)\\
\mathbf{elif}\;y \leq 5.9 \cdot 10^{+55}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{{x}^{-0.5} \cdot y}{-3}\\
\end{array}
\end{array}
if y < -6.19999999999999976e80Initial program 99.4%
*-un-lft-identity99.4%
*-commutative99.4%
times-frac99.5%
pow1/299.5%
pow-flip99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 97.3%
*-commutative97.3%
Simplified97.3%
if -6.19999999999999976e80 < y < 5.89999999999999948e55Initial program 99.7%
sub-neg99.7%
distribute-frac-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
neg-mul-199.7%
times-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 96.6%
cancel-sign-sub-inv96.6%
metadata-eval96.6%
associate-*r/96.7%
metadata-eval96.7%
Simplified96.7%
if 5.89999999999999948e55 < y Initial program 99.5%
*-un-lft-identity99.5%
*-commutative99.5%
times-frac99.4%
pow1/299.4%
pow-flip99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 85.4%
*-commutative85.4%
Simplified85.4%
associate-*l*85.3%
inv-pow85.3%
sqrt-pow185.3%
metadata-eval85.3%
associate-*r*85.4%
metadata-eval85.4%
metadata-eval85.4%
distribute-rgt-neg-in85.4%
metadata-eval85.4%
metadata-eval85.4%
div-inv85.4%
associate-/l*85.3%
distribute-neg-frac85.3%
Applied egg-rr85.3%
metadata-eval85.3%
associate-/r*85.3%
neg-mul-185.3%
associate-/l*85.4%
*-commutative85.4%
distribute-rgt-neg-out85.4%
distribute-lft-neg-in85.4%
remove-double-neg85.4%
Simplified85.4%
Final simplification94.2%
(FPCore (x y)
:precision binary64
(if (<= y -6.5e+83)
(/ (- (pow x -0.5)) (/ 3.0 y))
(if (<= y 1.2e+56)
(+ 1.0 (/ -0.1111111111111111 x))
(/ (* (pow x -0.5) y) -3.0))))
double code(double x, double y) {
double tmp;
if (y <= -6.5e+83) {
tmp = -pow(x, -0.5) / (3.0 / y);
} else if (y <= 1.2e+56) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (pow(x, -0.5) * y) / -3.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-6.5d+83)) then
tmp = -(x ** (-0.5d0)) / (3.0d0 / y)
else if (y <= 1.2d+56) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = ((x ** (-0.5d0)) * y) / (-3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -6.5e+83) {
tmp = -Math.pow(x, -0.5) / (3.0 / y);
} else if (y <= 1.2e+56) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (Math.pow(x, -0.5) * y) / -3.0;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -6.5e+83: tmp = -math.pow(x, -0.5) / (3.0 / y) elif y <= 1.2e+56: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = (math.pow(x, -0.5) * y) / -3.0 return tmp
function code(x, y) tmp = 0.0 if (y <= -6.5e+83) tmp = Float64(Float64(-(x ^ -0.5)) / Float64(3.0 / y)); elseif (y <= 1.2e+56) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(Float64((x ^ -0.5) * y) / -3.0); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -6.5e+83) tmp = -(x ^ -0.5) / (3.0 / y); elseif (y <= 1.2e+56) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = ((x ^ -0.5) * y) / -3.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -6.5e+83], N[((-N[Power[x, -0.5], $MachinePrecision]) / N[(3.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e+56], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[x, -0.5], $MachinePrecision] * y), $MachinePrecision] / -3.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+83}:\\
\;\;\;\;\frac{-{x}^{-0.5}}{\frac{3}{y}}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+56}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{{x}^{-0.5} \cdot y}{-3}\\
\end{array}
\end{array}
if y < -6.5000000000000003e83Initial program 99.4%
*-un-lft-identity99.4%
*-commutative99.4%
times-frac99.5%
pow1/299.5%
pow-flip99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 97.3%
*-commutative97.3%
Simplified97.3%
associate-*l*97.2%
inv-pow97.2%
sqrt-pow197.3%
metadata-eval97.3%
associate-*r*97.4%
metadata-eval97.4%
metadata-eval97.4%
distribute-rgt-neg-in97.4%
metadata-eval97.4%
metadata-eval97.4%
div-inv97.3%
associate-/l*97.4%
distribute-neg-frac97.4%
Applied egg-rr97.4%
if -6.5000000000000003e83 < y < 1.20000000000000007e56Initial program 99.7%
sub-neg99.7%
distribute-frac-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
neg-mul-199.7%
times-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 96.6%
cancel-sign-sub-inv96.6%
metadata-eval96.6%
associate-*r/96.7%
metadata-eval96.7%
Simplified96.7%
if 1.20000000000000007e56 < y Initial program 99.5%
*-un-lft-identity99.5%
*-commutative99.5%
times-frac99.4%
pow1/299.4%
pow-flip99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 85.4%
*-commutative85.4%
Simplified85.4%
associate-*l*85.3%
inv-pow85.3%
sqrt-pow185.3%
metadata-eval85.3%
associate-*r*85.4%
metadata-eval85.4%
metadata-eval85.4%
distribute-rgt-neg-in85.4%
metadata-eval85.4%
metadata-eval85.4%
div-inv85.4%
associate-/l*85.3%
distribute-neg-frac85.3%
Applied egg-rr85.3%
metadata-eval85.3%
associate-/r*85.3%
neg-mul-185.3%
associate-/l*85.4%
*-commutative85.4%
distribute-rgt-neg-out85.4%
distribute-lft-neg-in85.4%
remove-double-neg85.4%
Simplified85.4%
Final simplification94.2%
(FPCore (x y) :precision binary64 (if (or (<= y -8.2e+83) (not (<= y 2.9e+56))) (* -0.3333333333333333 (/ y (sqrt x))) (+ 1.0 (/ -0.1111111111111111 x))))
double code(double x, double y) {
double tmp;
if ((y <= -8.2e+83) || !(y <= 2.9e+56)) {
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 <= (-8.2d+83)) .or. (.not. (y <= 2.9d+56))) 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 <= -8.2e+83) || !(y <= 2.9e+56)) {
tmp = -0.3333333333333333 * (y / Math.sqrt(x));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -8.2e+83) or not (y <= 2.9e+56): 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 <= -8.2e+83) || !(y <= 2.9e+56)) 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 <= -8.2e+83) || ~((y <= 2.9e+56))) 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, -8.2e+83], N[Not[LessEqual[y, 2.9e+56]], $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 -8.2 \cdot 10^{+83} \lor \neg \left(y \leq 2.9 \cdot 10^{+56}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\end{array}
\end{array}
if y < -8.2000000000000002e83 or 2.90000000000000007e56 < y Initial program 99.5%
*-un-lft-identity99.5%
*-commutative99.5%
times-frac99.4%
pow1/299.4%
pow-flip99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 90.6%
*-commutative90.6%
Simplified90.6%
expm1-log1p-u44.8%
expm1-udef44.8%
*-commutative44.8%
sqrt-div44.8%
metadata-eval44.8%
Applied egg-rr44.8%
expm1-def44.8%
expm1-log1p90.5%
associate-*r/90.5%
*-rgt-identity90.5%
Simplified90.5%
if -8.2000000000000002e83 < y < 2.90000000000000007e56Initial program 99.7%
sub-neg99.7%
distribute-frac-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
neg-mul-199.7%
times-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 96.6%
cancel-sign-sub-inv96.6%
metadata-eval96.6%
associate-*r/96.7%
metadata-eval96.7%
Simplified96.7%
Final simplification94.1%
(FPCore (x y)
:precision binary64
(if (<= y -5.5e+83)
(/ (* y -0.3333333333333333) (sqrt x))
(if (<= y 5.1e+56)
(+ 1.0 (/ -0.1111111111111111 x))
(* -0.3333333333333333 (/ y (sqrt x))))))
double code(double x, double y) {
double tmp;
if (y <= -5.5e+83) {
tmp = (y * -0.3333333333333333) / sqrt(x);
} else if (y <= 5.1e+56) {
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 <= (-5.5d+83)) then
tmp = (y * (-0.3333333333333333d0)) / sqrt(x)
else if (y <= 5.1d+56) 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 <= -5.5e+83) {
tmp = (y * -0.3333333333333333) / Math.sqrt(x);
} else if (y <= 5.1e+56) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = -0.3333333333333333 * (y / Math.sqrt(x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -5.5e+83: tmp = (y * -0.3333333333333333) / math.sqrt(x) elif y <= 5.1e+56: 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 <= -5.5e+83) tmp = Float64(Float64(y * -0.3333333333333333) / sqrt(x)); elseif (y <= 5.1e+56) 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 <= -5.5e+83) tmp = (y * -0.3333333333333333) / sqrt(x); elseif (y <= 5.1e+56) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = -0.3333333333333333 * (y / sqrt(x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -5.5e+83], N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.1e+56], 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 -5.5 \cdot 10^{+83}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 5.1 \cdot 10^{+56}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -5.4999999999999996e83Initial program 99.4%
*-un-lft-identity99.4%
*-commutative99.4%
times-frac99.5%
pow1/299.5%
pow-flip99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 97.3%
*-commutative97.3%
Simplified97.3%
associate-*l*97.2%
sqrt-div97.1%
metadata-eval97.1%
associate-*l/97.3%
*-un-lft-identity97.3%
Applied egg-rr97.3%
if -5.4999999999999996e83 < y < 5.1000000000000002e56Initial program 99.7%
sub-neg99.7%
distribute-frac-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
neg-mul-199.7%
times-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 96.6%
cancel-sign-sub-inv96.6%
metadata-eval96.6%
associate-*r/96.7%
metadata-eval96.7%
Simplified96.7%
if 5.1000000000000002e56 < y Initial program 99.5%
*-un-lft-identity99.5%
*-commutative99.5%
times-frac99.4%
pow1/299.4%
pow-flip99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 85.4%
*-commutative85.4%
Simplified85.4%
expm1-log1p-u78.9%
expm1-udef79.0%
*-commutative79.0%
sqrt-div79.0%
metadata-eval79.0%
Applied egg-rr79.0%
expm1-def78.9%
expm1-log1p85.3%
associate-*r/85.4%
*-rgt-identity85.4%
Simplified85.4%
Final simplification94.2%
(FPCore (x y) :precision binary64 (if (<= x 0.11) (/ -0.1111111111111111 x) 1.0))
double code(double x, double y) {
double tmp;
if (x <= 0.11) {
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.11d0) 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.11) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.11: tmp = -0.1111111111111111 / x else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 0.11) 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.11) tmp = -0.1111111111111111 / x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.11], N[(-0.1111111111111111 / x), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.11:\\
\;\;\;\;\frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < 0.110000000000000001Initial program 99.5%
sub-neg99.5%
distribute-frac-neg99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
neg-mul-199.5%
times-frac99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 61.5%
if 0.110000000000000001 < x Initial program 99.7%
sub-neg99.7%
distribute-frac-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
neg-mul-199.7%
times-frac99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 57.8%
Final simplification59.9%
(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.6%
sub-neg99.6%
distribute-frac-neg99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
neg-mul-199.6%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 61.1%
cancel-sign-sub-inv61.1%
metadata-eval61.1%
associate-*r/61.2%
metadata-eval61.2%
Simplified61.2%
Final simplification61.2%
(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.6%
sub-neg99.6%
distribute-frac-neg99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
neg-mul-199.6%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 26.4%
Final simplification26.4%
(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 2023290
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, D"
:precision binary64
:herbie-target
(- (- 1.0 (/ (/ 1.0 x) 9.0)) (/ y (* 3.0 (sqrt x))))
(- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))