
(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))) (/ 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.9e+84) (not (<= y 5.2e+44))) (+ 1.0 (* -0.3333333333333333 (/ y (sqrt x)))) (- 1.0 (pow (* x 9.0) -1.0))))
double code(double x, double y) {
double tmp;
if ((y <= -2.9e+84) || !(y <= 5.2e+44)) {
tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x)));
} else {
tmp = 1.0 - pow((x * 9.0), -1.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-2.9d+84)) .or. (.not. (y <= 5.2d+44))) then
tmp = 1.0d0 + ((-0.3333333333333333d0) * (y / sqrt(x)))
else
tmp = 1.0d0 - ((x * 9.0d0) ** (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -2.9e+84) || !(y <= 5.2e+44)) {
tmp = 1.0 + (-0.3333333333333333 * (y / Math.sqrt(x)));
} else {
tmp = 1.0 - Math.pow((x * 9.0), -1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -2.9e+84) or not (y <= 5.2e+44): tmp = 1.0 + (-0.3333333333333333 * (y / math.sqrt(x))) else: tmp = 1.0 - math.pow((x * 9.0), -1.0) return tmp
function code(x, y) tmp = 0.0 if ((y <= -2.9e+84) || !(y <= 5.2e+44)) tmp = Float64(1.0 + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))); else tmp = Float64(1.0 - (Float64(x * 9.0) ^ -1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -2.9e+84) || ~((y <= 5.2e+44))) tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x))); else tmp = 1.0 - ((x * 9.0) ^ -1.0); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -2.9e+84], N[Not[LessEqual[y, 5.2e+44]], $MachinePrecision]], N[(1.0 + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[Power[N[(x * 9.0), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+84} \lor \neg \left(y \leq 5.2 \cdot 10^{+44}\right):\\
\;\;\;\;1 + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 - {\left(x \cdot 9\right)}^{-1}\\
\end{array}
\end{array}
if y < -2.89999999999999989e84 or 5.1999999999999998e44 < 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 95.1%
if -2.89999999999999989e84 < y < 5.1999999999999998e44Initial 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.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 94.2%
div-inv94.2%
metadata-eval94.2%
cancel-sign-sub-inv94.2%
*-commutative94.2%
metadata-eval94.2%
div-inv94.3%
associate-/r*94.3%
add-sqr-sqrt94.0%
sqrt-unprod66.3%
*-commutative66.3%
associate-/r*66.3%
metadata-eval66.3%
*-commutative66.3%
associate-/r*66.3%
metadata-eval66.3%
frac-times66.3%
metadata-eval66.3%
metadata-eval66.3%
frac-times66.3%
sqrt-unprod0.0%
add-sqr-sqrt40.4%
Applied egg-rr40.4%
add-sqr-sqrt0.0%
sqrt-unprod66.3%
frac-times66.3%
metadata-eval66.3%
metadata-eval66.3%
frac-times66.3%
clear-num66.3%
clear-num66.3%
frac-times66.3%
div-inv66.3%
metadata-eval66.3%
div-inv66.3%
metadata-eval66.3%
frac-times66.3%
sqrt-unprod94.0%
add-sqr-sqrt94.3%
inv-pow94.3%
Applied egg-rr94.3%
Final simplification94.6%
(FPCore (x y) :precision binary64 (if (or (<= y -2.9e+84) (not (<= y 1.9e+41))) (+ 1.0 (/ (/ y -3.0) (sqrt x))) (- 1.0 (pow (* x 9.0) -1.0))))
double code(double x, double y) {
double tmp;
if ((y <= -2.9e+84) || !(y <= 1.9e+41)) {
tmp = 1.0 + ((y / -3.0) / sqrt(x));
} else {
tmp = 1.0 - pow((x * 9.0), -1.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-2.9d+84)) .or. (.not. (y <= 1.9d+41))) then
tmp = 1.0d0 + ((y / (-3.0d0)) / sqrt(x))
else
tmp = 1.0d0 - ((x * 9.0d0) ** (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -2.9e+84) || !(y <= 1.9e+41)) {
tmp = 1.0 + ((y / -3.0) / Math.sqrt(x));
} else {
tmp = 1.0 - Math.pow((x * 9.0), -1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -2.9e+84) or not (y <= 1.9e+41): tmp = 1.0 + ((y / -3.0) / math.sqrt(x)) else: tmp = 1.0 - math.pow((x * 9.0), -1.0) return tmp
function code(x, y) tmp = 0.0 if ((y <= -2.9e+84) || !(y <= 1.9e+41)) tmp = Float64(1.0 + Float64(Float64(y / -3.0) / sqrt(x))); else tmp = Float64(1.0 - (Float64(x * 9.0) ^ -1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -2.9e+84) || ~((y <= 1.9e+41))) tmp = 1.0 + ((y / -3.0) / sqrt(x)); else tmp = 1.0 - ((x * 9.0) ^ -1.0); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -2.9e+84], N[Not[LessEqual[y, 1.9e+41]], $MachinePrecision]], N[(1.0 + N[(N[(y / -3.0), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[Power[N[(x * 9.0), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+84} \lor \neg \left(y \leq 1.9 \cdot 10^{+41}\right):\\
\;\;\;\;1 + \frac{\frac{y}{-3}}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 - {\left(x \cdot 9\right)}^{-1}\\
\end{array}
\end{array}
if y < -2.89999999999999989e84 or 1.9000000000000001e41 < y Initial program 99.6%
associate--l-99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
distribute-frac-neg99.6%
sub-neg99.6%
neg-mul-199.6%
*-commutative99.6%
associate-/l*99.5%
fma-neg99.5%
associate-/r*99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 95.0%
associate-*r*95.1%
*-commutative95.1%
associate-*l*95.0%
Simplified95.0%
associate-*r*95.1%
sqrt-div95.1%
metadata-eval95.1%
associate-*l/95.1%
metadata-eval95.1%
metadata-eval95.1%
associate-/r*95.1%
neg-mul-195.1%
un-div-inv95.1%
Applied egg-rr95.3%
frac-2neg95.3%
div-inv95.2%
remove-double-neg95.2%
distribute-rgt-neg-in95.2%
metadata-eval95.2%
Applied egg-rr95.2%
expm1-log1p-u44.3%
expm1-undefine44.3%
*-commutative44.3%
associate-/r*44.3%
metadata-eval44.3%
Applied egg-rr44.3%
Simplified95.2%
if -2.89999999999999989e84 < y < 1.9000000000000001e41Initial 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.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 94.2%
div-inv94.2%
metadata-eval94.2%
cancel-sign-sub-inv94.2%
*-commutative94.2%
metadata-eval94.2%
div-inv94.3%
associate-/r*94.3%
add-sqr-sqrt94.0%
sqrt-unprod66.3%
*-commutative66.3%
associate-/r*66.3%
metadata-eval66.3%
*-commutative66.3%
associate-/r*66.3%
metadata-eval66.3%
frac-times66.3%
metadata-eval66.3%
metadata-eval66.3%
frac-times66.3%
sqrt-unprod0.0%
add-sqr-sqrt40.4%
Applied egg-rr40.4%
add-sqr-sqrt0.0%
sqrt-unprod66.3%
frac-times66.3%
metadata-eval66.3%
metadata-eval66.3%
frac-times66.3%
clear-num66.3%
clear-num66.3%
frac-times66.3%
div-inv66.3%
metadata-eval66.3%
div-inv66.3%
metadata-eval66.3%
frac-times66.3%
sqrt-unprod94.0%
add-sqr-sqrt94.3%
inv-pow94.3%
Applied egg-rr94.3%
Final simplification94.7%
(FPCore (x y)
:precision binary64
(if (<= y -3.2e+84)
(+ 1.0 (/ -0.3333333333333333 (/ (sqrt x) y)))
(if (<= y 2.2e+44)
(- 1.0 (pow (* x 9.0) -1.0))
(+ 1.0 (* -0.3333333333333333 (/ y (sqrt x)))))))
double code(double x, double y) {
double tmp;
if (y <= -3.2e+84) {
tmp = 1.0 + (-0.3333333333333333 / (sqrt(x) / y));
} else if (y <= 2.2e+44) {
tmp = 1.0 - pow((x * 9.0), -1.0);
} else {
tmp = 1.0 + (-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 <= (-3.2d+84)) then
tmp = 1.0d0 + ((-0.3333333333333333d0) / (sqrt(x) / y))
else if (y <= 2.2d+44) then
tmp = 1.0d0 - ((x * 9.0d0) ** (-1.0d0))
else
tmp = 1.0d0 + ((-0.3333333333333333d0) * (y / sqrt(x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -3.2e+84) {
tmp = 1.0 + (-0.3333333333333333 / (Math.sqrt(x) / y));
} else if (y <= 2.2e+44) {
tmp = 1.0 - Math.pow((x * 9.0), -1.0);
} else {
tmp = 1.0 + (-0.3333333333333333 * (y / Math.sqrt(x)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -3.2e+84: tmp = 1.0 + (-0.3333333333333333 / (math.sqrt(x) / y)) elif y <= 2.2e+44: tmp = 1.0 - math.pow((x * 9.0), -1.0) else: tmp = 1.0 + (-0.3333333333333333 * (y / math.sqrt(x))) return tmp
function code(x, y) tmp = 0.0 if (y <= -3.2e+84) tmp = Float64(1.0 + Float64(-0.3333333333333333 / Float64(sqrt(x) / y))); elseif (y <= 2.2e+44) tmp = Float64(1.0 - (Float64(x * 9.0) ^ -1.0)); else tmp = Float64(1.0 + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -3.2e+84) tmp = 1.0 + (-0.3333333333333333 / (sqrt(x) / y)); elseif (y <= 2.2e+44) tmp = 1.0 - ((x * 9.0) ^ -1.0); else tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -3.2e+84], N[(1.0 + N[(-0.3333333333333333 / N[(N[Sqrt[x], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e+44], N[(1.0 - N[Power[N[(x * 9.0), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+84}:\\
\;\;\;\;1 + \frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+44}:\\
\;\;\;\;1 - {\left(x \cdot 9\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;1 + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -3.2000000000000001e84Initial program 99.5%
sub-neg99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
distribute-frac-neg99.5%
neg-mul-199.5%
times-frac99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around inf 99.4%
clear-num99.3%
un-div-inv99.5%
Applied egg-rr99.5%
if -3.2000000000000001e84 < y < 2.19999999999999996e44Initial 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.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 94.2%
div-inv94.2%
metadata-eval94.2%
cancel-sign-sub-inv94.2%
*-commutative94.2%
metadata-eval94.2%
div-inv94.3%
associate-/r*94.3%
add-sqr-sqrt94.0%
sqrt-unprod66.3%
*-commutative66.3%
associate-/r*66.3%
metadata-eval66.3%
*-commutative66.3%
associate-/r*66.3%
metadata-eval66.3%
frac-times66.3%
metadata-eval66.3%
metadata-eval66.3%
frac-times66.3%
sqrt-unprod0.0%
add-sqr-sqrt40.4%
Applied egg-rr40.4%
add-sqr-sqrt0.0%
sqrt-unprod66.3%
frac-times66.3%
metadata-eval66.3%
metadata-eval66.3%
frac-times66.3%
clear-num66.3%
clear-num66.3%
frac-times66.3%
div-inv66.3%
metadata-eval66.3%
div-inv66.3%
metadata-eval66.3%
frac-times66.3%
sqrt-unprod94.0%
add-sqr-sqrt94.3%
inv-pow94.3%
Applied egg-rr94.3%
if 2.19999999999999996e44 < 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 91.6%
Final simplification94.7%
(FPCore (x y)
:precision binary64
(if (<= y -2.9e+84)
(+ 1.0 (/ (/ y (sqrt x)) -3.0))
(if (<= y 9.6e+45)
(- 1.0 (pow (* x 9.0) -1.0))
(+ 1.0 (/ (/ y -3.0) (sqrt x))))))
double code(double x, double y) {
double tmp;
if (y <= -2.9e+84) {
tmp = 1.0 + ((y / sqrt(x)) / -3.0);
} else if (y <= 9.6e+45) {
tmp = 1.0 - pow((x * 9.0), -1.0);
} else {
tmp = 1.0 + ((y / -3.0) / 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.9d+84)) then
tmp = 1.0d0 + ((y / sqrt(x)) / (-3.0d0))
else if (y <= 9.6d+45) then
tmp = 1.0d0 - ((x * 9.0d0) ** (-1.0d0))
else
tmp = 1.0d0 + ((y / (-3.0d0)) / sqrt(x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -2.9e+84) {
tmp = 1.0 + ((y / Math.sqrt(x)) / -3.0);
} else if (y <= 9.6e+45) {
tmp = 1.0 - Math.pow((x * 9.0), -1.0);
} else {
tmp = 1.0 + ((y / -3.0) / Math.sqrt(x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -2.9e+84: tmp = 1.0 + ((y / math.sqrt(x)) / -3.0) elif y <= 9.6e+45: tmp = 1.0 - math.pow((x * 9.0), -1.0) else: tmp = 1.0 + ((y / -3.0) / math.sqrt(x)) return tmp
function code(x, y) tmp = 0.0 if (y <= -2.9e+84) tmp = Float64(1.0 + Float64(Float64(y / sqrt(x)) / -3.0)); elseif (y <= 9.6e+45) tmp = Float64(1.0 - (Float64(x * 9.0) ^ -1.0)); else tmp = Float64(1.0 + Float64(Float64(y / -3.0) / sqrt(x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -2.9e+84) tmp = 1.0 + ((y / sqrt(x)) / -3.0); elseif (y <= 9.6e+45) tmp = 1.0 - ((x * 9.0) ^ -1.0); else tmp = 1.0 + ((y / -3.0) / sqrt(x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -2.9e+84], N[(1.0 + N[(N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.6e+45], N[(1.0 - N[Power[N[(x * 9.0), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(y / -3.0), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+84}:\\
\;\;\;\;1 + \frac{\frac{y}{\sqrt{x}}}{-3}\\
\mathbf{elif}\;y \leq 9.6 \cdot 10^{+45}:\\
\;\;\;\;1 - {\left(x \cdot 9\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{y}{-3}}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -2.89999999999999989e84Initial program 99.5%
associate--l-99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
distribute-frac-neg99.5%
sub-neg99.5%
neg-mul-199.5%
*-commutative99.5%
associate-/l*99.5%
fma-neg99.5%
associate-/r*99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 99.2%
associate-*r*99.5%
*-commutative99.5%
associate-*l*99.3%
Simplified99.3%
associate-*r*99.5%
sqrt-div99.5%
metadata-eval99.5%
associate-*l/99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-/r*99.5%
neg-mul-199.5%
un-div-inv99.5%
Applied egg-rr99.5%
frac-2neg99.5%
div-inv99.5%
remove-double-neg99.5%
distribute-rgt-neg-in99.5%
metadata-eval99.5%
Applied egg-rr99.5%
un-div-inv99.5%
associate-/r*99.7%
Applied egg-rr99.7%
if -2.89999999999999989e84 < y < 9.59999999999999958e45Initial 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.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 94.2%
div-inv94.2%
metadata-eval94.2%
cancel-sign-sub-inv94.2%
*-commutative94.2%
metadata-eval94.2%
div-inv94.3%
associate-/r*94.3%
add-sqr-sqrt94.0%
sqrt-unprod66.3%
*-commutative66.3%
associate-/r*66.3%
metadata-eval66.3%
*-commutative66.3%
associate-/r*66.3%
metadata-eval66.3%
frac-times66.3%
metadata-eval66.3%
metadata-eval66.3%
frac-times66.3%
sqrt-unprod0.0%
add-sqr-sqrt40.4%
Applied egg-rr40.4%
add-sqr-sqrt0.0%
sqrt-unprod66.3%
frac-times66.3%
metadata-eval66.3%
metadata-eval66.3%
frac-times66.3%
clear-num66.3%
clear-num66.3%
frac-times66.3%
div-inv66.3%
metadata-eval66.3%
div-inv66.3%
metadata-eval66.3%
frac-times66.3%
sqrt-unprod94.0%
add-sqr-sqrt94.3%
inv-pow94.3%
Applied egg-rr94.3%
if 9.59999999999999958e45 < y Initial program 99.6%
associate--l-99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
distribute-frac-neg99.6%
sub-neg99.6%
neg-mul-199.6%
*-commutative99.6%
associate-/l*99.5%
fma-neg99.5%
associate-/r*99.3%
metadata-eval99.3%
*-commutative99.3%
associate-/r*99.3%
distribute-neg-frac99.3%
metadata-eval99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in y around inf 91.5%
associate-*r*91.5%
*-commutative91.5%
associate-*l*91.5%
Simplified91.5%
associate-*r*91.5%
sqrt-div91.5%
metadata-eval91.5%
associate-*l/91.5%
metadata-eval91.5%
metadata-eval91.5%
associate-/r*91.5%
neg-mul-191.5%
un-div-inv91.5%
Applied egg-rr91.7%
frac-2neg91.7%
div-inv91.6%
remove-double-neg91.6%
distribute-rgt-neg-in91.6%
metadata-eval91.6%
Applied egg-rr91.6%
expm1-log1p-u5.2%
expm1-undefine5.2%
*-commutative5.2%
associate-/r*5.2%
metadata-eval5.2%
Applied egg-rr5.2%
Simplified91.7%
Final simplification94.7%
(FPCore (x y)
:precision binary64
(if (<= y -2.9e+84)
(+ 1.0 (/ (/ y (sqrt x)) -3.0))
(if (<= y 1.5e+48)
(- 1.0 (pow (* x 9.0) -1.0))
(- 1.0 (/ y (sqrt (* x 9.0)))))))
double code(double x, double y) {
double tmp;
if (y <= -2.9e+84) {
tmp = 1.0 + ((y / sqrt(x)) / -3.0);
} else if (y <= 1.5e+48) {
tmp = 1.0 - pow((x * 9.0), -1.0);
} 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.9d+84)) then
tmp = 1.0d0 + ((y / sqrt(x)) / (-3.0d0))
else if (y <= 1.5d+48) then
tmp = 1.0d0 - ((x * 9.0d0) ** (-1.0d0))
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.9e+84) {
tmp = 1.0 + ((y / Math.sqrt(x)) / -3.0);
} else if (y <= 1.5e+48) {
tmp = 1.0 - Math.pow((x * 9.0), -1.0);
} else {
tmp = 1.0 - (y / Math.sqrt((x * 9.0)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -2.9e+84: tmp = 1.0 + ((y / math.sqrt(x)) / -3.0) elif y <= 1.5e+48: tmp = 1.0 - math.pow((x * 9.0), -1.0) else: tmp = 1.0 - (y / math.sqrt((x * 9.0))) return tmp
function code(x, y) tmp = 0.0 if (y <= -2.9e+84) tmp = Float64(1.0 + Float64(Float64(y / sqrt(x)) / -3.0)); elseif (y <= 1.5e+48) tmp = Float64(1.0 - (Float64(x * 9.0) ^ -1.0)); 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.9e+84) tmp = 1.0 + ((y / sqrt(x)) / -3.0); elseif (y <= 1.5e+48) tmp = 1.0 - ((x * 9.0) ^ -1.0); else tmp = 1.0 - (y / sqrt((x * 9.0))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -2.9e+84], N[(1.0 + N[(N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+48], N[(1.0 - N[Power[N[(x * 9.0), $MachinePrecision], -1.0], $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.9 \cdot 10^{+84}:\\
\;\;\;\;1 + \frac{\frac{y}{\sqrt{x}}}{-3}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+48}:\\
\;\;\;\;1 - {\left(x \cdot 9\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{y}{\sqrt{x \cdot 9}}\\
\end{array}
\end{array}
if y < -2.89999999999999989e84Initial program 99.5%
associate--l-99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
distribute-frac-neg99.5%
sub-neg99.5%
neg-mul-199.5%
*-commutative99.5%
associate-/l*99.5%
fma-neg99.5%
associate-/r*99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 99.2%
associate-*r*99.5%
*-commutative99.5%
associate-*l*99.3%
Simplified99.3%
associate-*r*99.5%
sqrt-div99.5%
metadata-eval99.5%
associate-*l/99.5%
metadata-eval99.5%
metadata-eval99.5%
associate-/r*99.5%
neg-mul-199.5%
un-div-inv99.5%
Applied egg-rr99.5%
frac-2neg99.5%
div-inv99.5%
remove-double-neg99.5%
distribute-rgt-neg-in99.5%
metadata-eval99.5%
Applied egg-rr99.5%
un-div-inv99.5%
associate-/r*99.7%
Applied egg-rr99.7%
if -2.89999999999999989e84 < y < 1.5e48Initial 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.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 94.2%
div-inv94.2%
metadata-eval94.2%
cancel-sign-sub-inv94.2%
*-commutative94.2%
metadata-eval94.2%
div-inv94.3%
associate-/r*94.3%
add-sqr-sqrt94.0%
sqrt-unprod66.3%
*-commutative66.3%
associate-/r*66.3%
metadata-eval66.3%
*-commutative66.3%
associate-/r*66.3%
metadata-eval66.3%
frac-times66.3%
metadata-eval66.3%
metadata-eval66.3%
frac-times66.3%
sqrt-unprod0.0%
add-sqr-sqrt40.4%
Applied egg-rr40.4%
add-sqr-sqrt0.0%
sqrt-unprod66.3%
frac-times66.3%
metadata-eval66.3%
metadata-eval66.3%
frac-times66.3%
clear-num66.3%
clear-num66.3%
frac-times66.3%
div-inv66.3%
metadata-eval66.3%
div-inv66.3%
metadata-eval66.3%
frac-times66.3%
sqrt-unprod94.0%
add-sqr-sqrt94.3%
inv-pow94.3%
Applied egg-rr94.3%
if 1.5e48 < y Initial 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 inf 91.8%
Final simplification94.7%
(FPCore (x y) :precision binary64 (if (<= x 16000000000000.0) (+ 1.0 (/ (- (* -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 <= 16000000000000.0) {
tmp = 1.0 + (((-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 <= 16000000000000.0d0) then
tmp = 1.0d0 + ((((-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 <= 16000000000000.0) {
tmp = 1.0 + (((-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 <= 16000000000000.0: tmp = 1.0 + (((-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 <= 16000000000000.0) tmp = Float64(1.0 + Float64(Float64(Float64(-0.3333333333333333 * Float64(y * sqrt(x))) - 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 <= 16000000000000.0) tmp = 1.0 + (((-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, 16000000000000.0], N[(1.0 + N[(N[(N[(-0.3333333333333333 * N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.1111111111111111), $MachinePrecision] / 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 16000000000000:\\
\;\;\;\;1 + \frac{-0.3333333333333333 \cdot \left(y \cdot \sqrt{x}\right) - 0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{y}{\sqrt{x \cdot 9}}\\
\end{array}
\end{array}
if x < 1.6e13Initial 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.7%
fma-neg99.7%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 99.5%
if 1.6e13 < x Initial program 99.8%
*-commutative99.8%
metadata-eval99.8%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
Taylor expanded in x around inf 99.8%
Final simplification99.6%
(FPCore (x y) :precision binary64 (if (<= x 9.5e-5) (+ (* -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 <= 9.5e-5) {
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 <= 9.5d-5) 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 <= 9.5e-5) {
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 <= 9.5e-5: 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 <= 9.5e-5) 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 <= 9.5e-5) 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, 9.5e-5], 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 9.5 \cdot 10^{-5}:\\
\;\;\;\;-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 < 9.5000000000000005e-5Initial program 99.6%
sub-neg99.6%
*-commutative99.6%
associate-/r*99.5%
metadata-eval99.5%
distribute-frac-neg99.5%
neg-mul-199.5%
times-frac99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 99.5%
*-commutative99.5%
metadata-eval99.5%
div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 99.1%
if 9.5000000000000005e-5 < x Initial program 99.8%
*-commutative99.8%
metadata-eval99.8%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
Taylor expanded in x around inf 99.7%
Final simplification99.4%
(FPCore (x y) :precision binary64 (let* ((t_0 (/ y (sqrt (* x 9.0))))) (if (<= x 9.5e-5) (- (/ -0.1111111111111111 x) t_0) (- 1.0 t_0))))
double code(double x, double y) {
double t_0 = y / sqrt((x * 9.0));
double tmp;
if (x <= 9.5e-5) {
tmp = (-0.1111111111111111 / x) - t_0;
} else {
tmp = 1.0 - t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = y / sqrt((x * 9.0d0))
if (x <= 9.5d-5) then
tmp = ((-0.1111111111111111d0) / x) - t_0
else
tmp = 1.0d0 - t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y / Math.sqrt((x * 9.0));
double tmp;
if (x <= 9.5e-5) {
tmp = (-0.1111111111111111 / x) - t_0;
} else {
tmp = 1.0 - t_0;
}
return tmp;
}
def code(x, y): t_0 = y / math.sqrt((x * 9.0)) tmp = 0 if x <= 9.5e-5: tmp = (-0.1111111111111111 / x) - t_0 else: tmp = 1.0 - t_0 return tmp
function code(x, y) t_0 = Float64(y / sqrt(Float64(x * 9.0))) tmp = 0.0 if (x <= 9.5e-5) tmp = Float64(Float64(-0.1111111111111111 / x) - t_0); else tmp = Float64(1.0 - t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = y / sqrt((x * 9.0)); tmp = 0.0; if (x <= 9.5e-5) tmp = (-0.1111111111111111 / x) - t_0; else tmp = 1.0 - t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 9.5e-5], N[(N[(-0.1111111111111111 / x), $MachinePrecision] - t$95$0), $MachinePrecision], N[(1.0 - t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{\sqrt{x \cdot 9}}\\
\mathbf{if}\;x \leq 9.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{-0.1111111111111111}{x} - t\_0\\
\mathbf{else}:\\
\;\;\;\;1 - t\_0\\
\end{array}
\end{array}
if x < 9.5000000000000005e-5Initial 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.2%
if 9.5000000000000005e-5 < x Initial program 99.8%
*-commutative99.8%
metadata-eval99.8%
sqrt-prod99.8%
pow1/299.8%
Applied egg-rr99.8%
unpow1/299.8%
Simplified99.8%
Taylor expanded in x around inf 99.7%
Final simplification99.4%
(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.6%
metadata-eval99.6%
distribute-frac-neg99.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 (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / (3.0 * 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 / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
Initial program 99.7%
Taylor expanded in x around 0 99.6%
Final simplification99.6%
(FPCore (x y) :precision binary64 (- 1.0 (pow (* x 9.0) -1.0)))
double code(double x, double y) {
return 1.0 - pow((x * 9.0), -1.0);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 - ((x * 9.0d0) ** (-1.0d0))
end function
public static double code(double x, double y) {
return 1.0 - Math.pow((x * 9.0), -1.0);
}
def code(x, y): return 1.0 - math.pow((x * 9.0), -1.0)
function code(x, y) return Float64(1.0 - (Float64(x * 9.0) ^ -1.0)) end
function tmp = code(x, y) tmp = 1.0 - ((x * 9.0) ^ -1.0); end
code[x_, y_] := N[(1.0 - N[Power[N[(x * 9.0), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - {\left(x \cdot 9\right)}^{-1}
\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.7%
fma-neg99.7%
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 58.7%
div-inv58.7%
metadata-eval58.7%
cancel-sign-sub-inv58.7%
*-commutative58.7%
metadata-eval58.7%
div-inv58.7%
associate-/r*58.8%
add-sqr-sqrt58.6%
sqrt-unprod44.0%
*-commutative44.0%
associate-/r*44.0%
metadata-eval44.0%
*-commutative44.0%
associate-/r*44.0%
metadata-eval44.0%
frac-times44.0%
metadata-eval44.0%
metadata-eval44.0%
frac-times44.0%
sqrt-unprod0.0%
add-sqr-sqrt26.0%
Applied egg-rr26.0%
add-sqr-sqrt0.0%
sqrt-unprod44.0%
frac-times44.0%
metadata-eval44.0%
metadata-eval44.0%
frac-times44.0%
clear-num44.0%
clear-num44.0%
frac-times44.0%
div-inv44.0%
metadata-eval44.0%
div-inv44.0%
metadata-eval44.0%
frac-times44.0%
sqrt-unprod58.6%
add-sqr-sqrt58.8%
inv-pow58.8%
Applied egg-rr58.8%
Final simplification58.8%
(FPCore (x y) :precision binary64 (+ 1.0 (* -0.1111111111111111 (/ 1.0 x))))
double code(double x, double y) {
return 1.0 + (-0.1111111111111111 * (1.0 / x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + ((-0.1111111111111111d0) * (1.0d0 / x))
end function
public static double code(double x, double y) {
return 1.0 + (-0.1111111111111111 * (1.0 / x));
}
def code(x, y): return 1.0 + (-0.1111111111111111 * (1.0 / x))
function code(x, y) return Float64(1.0 + Float64(-0.1111111111111111 * Float64(1.0 / x))) end
function tmp = code(x, y) tmp = 1.0 + (-0.1111111111111111 * (1.0 / x)); end
code[x_, y_] := N[(1.0 + N[(-0.1111111111111111 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + -0.1111111111111111 \cdot \frac{1}{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.7%
fma-neg99.7%
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 58.7%
clear-num58.7%
associate-/r/58.7%
Applied egg-rr58.7%
Final simplification58.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.7%
fma-neg99.7%
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 58.7%
Final simplification58.7%
(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%
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.7%
fma-neg99.7%
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 58.7%
div-inv58.7%
metadata-eval58.7%
cancel-sign-sub-inv58.7%
*-commutative58.7%
metadata-eval58.7%
div-inv58.7%
associate-/r*58.8%
add-sqr-sqrt58.6%
sqrt-unprod44.0%
*-commutative44.0%
associate-/r*44.0%
metadata-eval44.0%
*-commutative44.0%
associate-/r*44.0%
metadata-eval44.0%
frac-times44.0%
metadata-eval44.0%
metadata-eval44.0%
frac-times44.0%
sqrt-unprod0.0%
add-sqr-sqrt26.0%
Applied egg-rr26.0%
add-sqr-sqrt0.0%
sqrt-unprod44.0%
frac-times44.0%
metadata-eval44.0%
metadata-eval44.0%
frac-times44.0%
clear-num44.0%
clear-num44.0%
frac-times44.0%
div-inv44.0%
metadata-eval44.0%
div-inv44.0%
metadata-eval44.0%
frac-times44.0%
sqrt-unprod58.6%
add-sqr-sqrt58.8%
inv-pow58.8%
Applied egg-rr58.8%
Taylor expanded in x around inf 26.0%
Final simplification26.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 2024076
(FPCore (x y)
:name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, D"
:precision binary64
:alt
(- (- 1.0 (/ (/ 1.0 x) 9.0)) (/ y (* 3.0 (sqrt x))))
(- (- 1.0 (/ 1.0 (* x 9.0))) (/ y (* 3.0 (sqrt x)))))