
(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.6%
*-commutative99.6%
metadata-eval99.6%
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 -1.9e+42) (not (<= y 1.02e+36))) (- 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 <= -1.9e+42) || !(y <= 1.02e+36)) {
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 <= (-1.9d+42)) .or. (.not. (y <= 1.02d+36))) 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 <= -1.9e+42) || !(y <= 1.02e+36)) {
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 <= -1.9e+42) or not (y <= 1.02e+36): 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 <= -1.9e+42) || !(y <= 1.02e+36)) 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 <= -1.9e+42) || ~((y <= 1.02e+36))) 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, -1.9e+42], N[Not[LessEqual[y, 1.02e+36]], $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 -1.9 \cdot 10^{+42} \lor \neg \left(y \leq 1.02 \cdot 10^{+36}\right):\\
\;\;\;\;1 - 0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 - {\left(x \cdot 9\right)}^{-1}\\
\end{array}
\end{array}
if y < -1.8999999999999999e42 or 1.02000000000000003e36 < y Initial program 99.5%
Taylor expanded in x around inf 94.2%
*-commutative94.2%
sqrt-div94.1%
metadata-eval94.1%
div-inv94.2%
Applied egg-rr94.2%
if -1.8999999999999999e42 < y < 1.02000000000000003e36Initial 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.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 98.0%
metadata-eval98.0%
distribute-neg-frac98.0%
add-sqr-sqrt97.8%
sqrt-unprod71.2%
frac-times71.2%
metadata-eval71.2%
metadata-eval71.2%
frac-times71.2%
sqrt-unprod0.0%
add-sqr-sqrt39.4%
Applied egg-rr39.4%
add-sqr-sqrt0.0%
sqrt-unprod71.2%
frac-times71.2%
metadata-eval71.2%
metadata-eval71.2%
frac-times71.2%
sqrt-unprod97.8%
add-sqr-sqrt98.0%
clear-num98.0%
div-inv98.1%
metadata-eval98.1%
inv-pow98.1%
Applied egg-rr98.1%
Final simplification96.5%
(FPCore (x y) :precision binary64 (if (or (<= y -3.8e+38) (not (<= y 2.75e+39))) (- 1.0 (/ y (sqrt (* x 9.0)))) (- 1.0 (pow (* x 9.0) -1.0))))
double code(double x, double y) {
double tmp;
if ((y <= -3.8e+38) || !(y <= 2.75e+39)) {
tmp = 1.0 - (y / sqrt((x * 9.0)));
} 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 <= (-3.8d+38)) .or. (.not. (y <= 2.75d+39))) then
tmp = 1.0d0 - (y / sqrt((x * 9.0d0)))
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 <= -3.8e+38) || !(y <= 2.75e+39)) {
tmp = 1.0 - (y / Math.sqrt((x * 9.0)));
} else {
tmp = 1.0 - Math.pow((x * 9.0), -1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -3.8e+38) or not (y <= 2.75e+39): tmp = 1.0 - (y / math.sqrt((x * 9.0))) else: tmp = 1.0 - math.pow((x * 9.0), -1.0) return tmp
function code(x, y) tmp = 0.0 if ((y <= -3.8e+38) || !(y <= 2.75e+39)) tmp = Float64(1.0 - Float64(y / sqrt(Float64(x * 9.0)))); 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 <= -3.8e+38) || ~((y <= 2.75e+39))) tmp = 1.0 - (y / sqrt((x * 9.0))); else tmp = 1.0 - ((x * 9.0) ^ -1.0); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -3.8e+38], N[Not[LessEqual[y, 2.75e+39]], $MachinePrecision]], N[(1.0 - N[(y / N[Sqrt[N[(x * 9.0), $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 -3.8 \cdot 10^{+38} \lor \neg \left(y \leq 2.75 \cdot 10^{+39}\right):\\
\;\;\;\;1 - \frac{y}{\sqrt{x \cdot 9}}\\
\mathbf{else}:\\
\;\;\;\;1 - {\left(x \cdot 9\right)}^{-1}\\
\end{array}
\end{array}
if y < -3.7999999999999998e38 or 2.7499999999999999e39 < y Initial program 99.5%
Taylor expanded in x around inf 94.2%
*-commutative94.2%
sqrt-div94.1%
metadata-eval94.1%
div-inv94.2%
clear-num94.1%
Applied egg-rr94.1%
un-div-inv94.2%
associate-/r/94.1%
metadata-eval94.1%
sqrt-div94.3%
clear-num94.2%
sqrt-div94.2%
metadata-eval94.2%
div-inv94.2%
metadata-eval94.2%
associate-/r/94.2%
clear-num94.3%
Applied egg-rr94.3%
if -3.7999999999999998e38 < y < 2.7499999999999999e39Initial 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.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 98.0%
metadata-eval98.0%
distribute-neg-frac98.0%
add-sqr-sqrt97.8%
sqrt-unprod71.2%
frac-times71.2%
metadata-eval71.2%
metadata-eval71.2%
frac-times71.2%
sqrt-unprod0.0%
add-sqr-sqrt39.4%
Applied egg-rr39.4%
add-sqr-sqrt0.0%
sqrt-unprod71.2%
frac-times71.2%
metadata-eval71.2%
metadata-eval71.2%
frac-times71.2%
sqrt-unprod97.8%
add-sqr-sqrt98.0%
clear-num98.0%
div-inv98.1%
metadata-eval98.1%
inv-pow98.1%
Applied egg-rr98.1%
Final simplification96.5%
(FPCore (x y)
:precision binary64
(if (<= y -3.3e+42)
(- 1.0 (/ 0.3333333333333333 (/ (sqrt x) y)))
(if (<= y 4.2e+36)
(- 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.3e+42) {
tmp = 1.0 - (0.3333333333333333 / (sqrt(x) / y));
} else if (y <= 4.2e+36) {
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.3d+42)) then
tmp = 1.0d0 - (0.3333333333333333d0 / (sqrt(x) / y))
else if (y <= 4.2d+36) 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.3e+42) {
tmp = 1.0 - (0.3333333333333333 / (Math.sqrt(x) / y));
} else if (y <= 4.2e+36) {
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.3e+42: tmp = 1.0 - (0.3333333333333333 / (math.sqrt(x) / y)) elif y <= 4.2e+36: 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.3e+42) tmp = Float64(1.0 - Float64(0.3333333333333333 / Float64(sqrt(x) / y))); elseif (y <= 4.2e+36) 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.3e+42) tmp = 1.0 - (0.3333333333333333 / (sqrt(x) / y)); elseif (y <= 4.2e+36) 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.3e+42], N[(1.0 - N[(0.3333333333333333 / N[(N[Sqrt[x], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.2e+36], 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.3 \cdot 10^{+42}:\\
\;\;\;\;1 - \frac{0.3333333333333333}{\frac{\sqrt{x}}{y}}\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+36}:\\
\;\;\;\;1 - {\left(x \cdot 9\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;1 - 0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -3.2999999999999999e42Initial program 99.6%
Taylor expanded in x around inf 93.6%
*-commutative93.6%
sqrt-div93.5%
metadata-eval93.5%
div-inv93.6%
clear-num93.4%
Applied egg-rr93.4%
un-div-inv93.7%
Applied egg-rr93.7%
if -3.2999999999999999e42 < y < 4.20000000000000009e36Initial 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.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 98.0%
metadata-eval98.0%
distribute-neg-frac98.0%
add-sqr-sqrt97.8%
sqrt-unprod71.2%
frac-times71.2%
metadata-eval71.2%
metadata-eval71.2%
frac-times71.2%
sqrt-unprod0.0%
add-sqr-sqrt39.4%
Applied egg-rr39.4%
add-sqr-sqrt0.0%
sqrt-unprod71.2%
frac-times71.2%
metadata-eval71.2%
metadata-eval71.2%
frac-times71.2%
sqrt-unprod97.8%
add-sqr-sqrt98.0%
clear-num98.0%
div-inv98.1%
metadata-eval98.1%
inv-pow98.1%
Applied egg-rr98.1%
if 4.20000000000000009e36 < y Initial program 99.5%
Taylor expanded in x around inf 94.7%
*-commutative94.7%
sqrt-div94.7%
metadata-eval94.7%
div-inv94.8%
Applied egg-rr94.8%
Final simplification96.5%
(FPCore (x y)
:precision binary64
(if (<= y -1.26e+41)
(- 1.0 (/ y (sqrt (* x 9.0))))
(if (<= y 2.6e+37)
(- 1.0 (pow (* x 9.0) -1.0))
(- 1.0 (/ (/ y (sqrt x)) 3.0)))))
double code(double x, double y) {
double tmp;
if (y <= -1.26e+41) {
tmp = 1.0 - (y / sqrt((x * 9.0)));
} else if (y <= 2.6e+37) {
tmp = 1.0 - pow((x * 9.0), -1.0);
} else {
tmp = 1.0 - ((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 <= (-1.26d+41)) then
tmp = 1.0d0 - (y / sqrt((x * 9.0d0)))
else if (y <= 2.6d+37) then
tmp = 1.0d0 - ((x * 9.0d0) ** (-1.0d0))
else
tmp = 1.0d0 - ((y / sqrt(x)) / 3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.26e+41) {
tmp = 1.0 - (y / Math.sqrt((x * 9.0)));
} else if (y <= 2.6e+37) {
tmp = 1.0 - Math.pow((x * 9.0), -1.0);
} else {
tmp = 1.0 - ((y / Math.sqrt(x)) / 3.0);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.26e+41: tmp = 1.0 - (y / math.sqrt((x * 9.0))) elif y <= 2.6e+37: tmp = 1.0 - math.pow((x * 9.0), -1.0) else: tmp = 1.0 - ((y / math.sqrt(x)) / 3.0) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.26e+41) tmp = Float64(1.0 - Float64(y / sqrt(Float64(x * 9.0)))); elseif (y <= 2.6e+37) tmp = Float64(1.0 - (Float64(x * 9.0) ^ -1.0)); else tmp = Float64(1.0 - Float64(Float64(y / sqrt(x)) / 3.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.26e+41) tmp = 1.0 - (y / sqrt((x * 9.0))); elseif (y <= 2.6e+37) tmp = 1.0 - ((x * 9.0) ^ -1.0); else tmp = 1.0 - ((y / sqrt(x)) / 3.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.26e+41], N[(1.0 - N[(y / N[Sqrt[N[(x * 9.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e+37], N[(1.0 - N[Power[N[(x * 9.0), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.26 \cdot 10^{+41}:\\
\;\;\;\;1 - \frac{y}{\sqrt{x \cdot 9}}\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+37}:\\
\;\;\;\;1 - {\left(x \cdot 9\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{y}{\sqrt{x}}}{3}\\
\end{array}
\end{array}
if y < -1.26000000000000001e41Initial program 99.6%
Taylor expanded in x around inf 93.6%
*-commutative93.6%
sqrt-div93.5%
metadata-eval93.5%
div-inv93.6%
clear-num93.4%
Applied egg-rr93.4%
un-div-inv93.7%
associate-/r/93.5%
metadata-eval93.5%
sqrt-div93.7%
clear-num93.6%
sqrt-div93.7%
metadata-eval93.7%
div-inv93.8%
metadata-eval93.8%
associate-/r/93.8%
clear-num93.8%
Applied egg-rr93.8%
if -1.26000000000000001e41 < y < 2.5999999999999999e37Initial 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.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 98.0%
metadata-eval98.0%
distribute-neg-frac98.0%
add-sqr-sqrt97.8%
sqrt-unprod71.2%
frac-times71.2%
metadata-eval71.2%
metadata-eval71.2%
frac-times71.2%
sqrt-unprod0.0%
add-sqr-sqrt39.4%
Applied egg-rr39.4%
add-sqr-sqrt0.0%
sqrt-unprod71.2%
frac-times71.2%
metadata-eval71.2%
metadata-eval71.2%
frac-times71.2%
sqrt-unprod97.8%
add-sqr-sqrt98.0%
clear-num98.0%
div-inv98.1%
metadata-eval98.1%
inv-pow98.1%
Applied egg-rr98.1%
if 2.5999999999999999e37 < y Initial program 99.5%
Taylor expanded in x around inf 94.7%
*-commutative94.7%
sqrt-div94.7%
metadata-eval94.7%
div-inv94.8%
clear-num94.7%
Applied egg-rr94.7%
un-div-inv94.7%
associate-/r/94.6%
metadata-eval94.6%
sqrt-div94.9%
clear-num94.8%
sqrt-div94.6%
metadata-eval94.6%
div-inv94.7%
metadata-eval94.7%
associate-/r/94.7%
clear-num94.9%
sqrt-prod94.7%
associate-/r*94.9%
metadata-eval94.9%
Applied egg-rr94.9%
Final simplification96.6%
(FPCore (x y)
:precision binary64
(if (<= y -4.2e+97)
(* (sqrt (/ 1.0 x)) (* y -0.3333333333333333))
(if (<= y 4.1e+81)
(- 1.0 (pow (* x 9.0) -1.0))
(/ (* y -0.3333333333333333) (sqrt x)))))
double code(double x, double y) {
double tmp;
if (y <= -4.2e+97) {
tmp = sqrt((1.0 / x)) * (y * -0.3333333333333333);
} else if (y <= 4.1e+81) {
tmp = 1.0 - pow((x * 9.0), -1.0);
} else {
tmp = (y * -0.3333333333333333) / 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 <= (-4.2d+97)) then
tmp = sqrt((1.0d0 / x)) * (y * (-0.3333333333333333d0))
else if (y <= 4.1d+81) then
tmp = 1.0d0 - ((x * 9.0d0) ** (-1.0d0))
else
tmp = (y * (-0.3333333333333333d0)) / sqrt(x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -4.2e+97) {
tmp = Math.sqrt((1.0 / x)) * (y * -0.3333333333333333);
} else if (y <= 4.1e+81) {
tmp = 1.0 - Math.pow((x * 9.0), -1.0);
} else {
tmp = (y * -0.3333333333333333) / Math.sqrt(x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -4.2e+97: tmp = math.sqrt((1.0 / x)) * (y * -0.3333333333333333) elif y <= 4.1e+81: tmp = 1.0 - math.pow((x * 9.0), -1.0) else: tmp = (y * -0.3333333333333333) / math.sqrt(x) return tmp
function code(x, y) tmp = 0.0 if (y <= -4.2e+97) tmp = Float64(sqrt(Float64(1.0 / x)) * Float64(y * -0.3333333333333333)); elseif (y <= 4.1e+81) tmp = Float64(1.0 - (Float64(x * 9.0) ^ -1.0)); else tmp = Float64(Float64(y * -0.3333333333333333) / sqrt(x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -4.2e+97) tmp = sqrt((1.0 / x)) * (y * -0.3333333333333333); elseif (y <= 4.1e+81) tmp = 1.0 - ((x * 9.0) ^ -1.0); else tmp = (y * -0.3333333333333333) / sqrt(x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -4.2e+97], N[(N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision] * N[(y * -0.3333333333333333), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.1e+81], N[(1.0 - N[Power[N[(x * 9.0), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision], N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+97}:\\
\;\;\;\;\sqrt{\frac{1}{x}} \cdot \left(y \cdot -0.3333333333333333\right)\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{+81}:\\
\;\;\;\;1 - {\left(x \cdot 9\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -4.20000000000000023e97Initial 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.7%
associate-*r*94.7%
*-commutative94.7%
associate-*l*94.8%
Simplified94.8%
if -4.20000000000000023e97 < y < 4.10000000000000012e81Initial 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.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 94.3%
metadata-eval94.3%
distribute-neg-frac94.3%
add-sqr-sqrt94.1%
sqrt-unprod68.7%
frac-times68.7%
metadata-eval68.7%
metadata-eval68.7%
frac-times68.7%
sqrt-unprod0.0%
add-sqr-sqrt40.1%
Applied egg-rr40.1%
add-sqr-sqrt0.0%
sqrt-unprod68.7%
frac-times68.7%
metadata-eval68.7%
metadata-eval68.7%
frac-times68.7%
sqrt-unprod94.1%
add-sqr-sqrt94.3%
clear-num94.3%
div-inv94.3%
metadata-eval94.3%
inv-pow94.3%
Applied egg-rr94.3%
if 4.10000000000000012e81 < y Initial program 99.4%
*-commutative99.4%
metadata-eval99.4%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
Taylor expanded in y around inf 95.4%
associate-*r*95.6%
*-commutative95.6%
associate-*l*95.4%
Simplified95.4%
*-commutative95.4%
sqrt-div95.3%
metadata-eval95.3%
un-div-inv95.6%
*-commutative95.6%
Applied egg-rr95.6%
Final simplification94.7%
(FPCore (x y) :precision binary64 (if (or (<= y -3.3e+97) (not (<= y 1.15e+81))) (* y (/ -0.3333333333333333 (sqrt x))) (+ 1.0 (* 0.1111111111111111 (/ -1.0 x)))))
double code(double x, double y) {
double tmp;
if ((y <= -3.3e+97) || !(y <= 1.15e+81)) {
tmp = y * (-0.3333333333333333 / sqrt(x));
} else {
tmp = 1.0 + (0.1111111111111111 * (-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 <= (-3.3d+97)) .or. (.not. (y <= 1.15d+81))) then
tmp = y * ((-0.3333333333333333d0) / sqrt(x))
else
tmp = 1.0d0 + (0.1111111111111111d0 * ((-1.0d0) / x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -3.3e+97) || !(y <= 1.15e+81)) {
tmp = y * (-0.3333333333333333 / Math.sqrt(x));
} else {
tmp = 1.0 + (0.1111111111111111 * (-1.0 / x));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -3.3e+97) or not (y <= 1.15e+81): tmp = y * (-0.3333333333333333 / math.sqrt(x)) else: tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -3.3e+97) || !(y <= 1.15e+81)) tmp = Float64(y * Float64(-0.3333333333333333 / sqrt(x))); else tmp = Float64(1.0 + Float64(0.1111111111111111 * Float64(-1.0 / x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -3.3e+97) || ~((y <= 1.15e+81))) tmp = y * (-0.3333333333333333 / sqrt(x)); else tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -3.3e+97], N[Not[LessEqual[y, 1.15e+81]], $MachinePrecision]], N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(0.1111111111111111 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{+97} \lor \neg \left(y \leq 1.15 \cdot 10^{+81}\right):\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + 0.1111111111111111 \cdot \frac{-1}{x}\\
\end{array}
\end{array}
if y < -3.3000000000000001e97 or 1.1499999999999999e81 < 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 95.1%
associate-*r*95.2%
*-commutative95.2%
associate-*l*95.1%
Simplified95.1%
*-commutative95.1%
sqrt-div95.0%
metadata-eval95.0%
un-div-inv95.2%
*-commutative95.2%
Applied egg-rr95.2%
associate-/l*95.0%
Simplified95.0%
if -3.3000000000000001e97 < y < 1.1499999999999999e81Initial 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%
Taylor expanded in y around 0 94.3%
Final simplification94.6%
(FPCore (x y) :precision binary64 (if (or (<= y -6.6e+97) (not (<= y 4.8e+82))) (/ (* y -0.3333333333333333) (sqrt x)) (+ 1.0 (* 0.1111111111111111 (/ -1.0 x)))))
double code(double x, double y) {
double tmp;
if ((y <= -6.6e+97) || !(y <= 4.8e+82)) {
tmp = (y * -0.3333333333333333) / sqrt(x);
} else {
tmp = 1.0 + (0.1111111111111111 * (-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 <= (-6.6d+97)) .or. (.not. (y <= 4.8d+82))) then
tmp = (y * (-0.3333333333333333d0)) / sqrt(x)
else
tmp = 1.0d0 + (0.1111111111111111d0 * ((-1.0d0) / x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -6.6e+97) || !(y <= 4.8e+82)) {
tmp = (y * -0.3333333333333333) / Math.sqrt(x);
} else {
tmp = 1.0 + (0.1111111111111111 * (-1.0 / x));
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -6.6e+97) or not (y <= 4.8e+82): tmp = (y * -0.3333333333333333) / math.sqrt(x) else: tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)) return tmp
function code(x, y) tmp = 0.0 if ((y <= -6.6e+97) || !(y <= 4.8e+82)) tmp = Float64(Float64(y * -0.3333333333333333) / sqrt(x)); else tmp = Float64(1.0 + Float64(0.1111111111111111 * Float64(-1.0 / x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -6.6e+97) || ~((y <= 4.8e+82))) tmp = (y * -0.3333333333333333) / sqrt(x); else tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -6.6e+97], N[Not[LessEqual[y, 4.8e+82]], $MachinePrecision]], N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(0.1111111111111111 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.6 \cdot 10^{+97} \lor \neg \left(y \leq 4.8 \cdot 10^{+82}\right):\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + 0.1111111111111111 \cdot \frac{-1}{x}\\
\end{array}
\end{array}
if y < -6.6000000000000003e97 or 4.79999999999999996e82 < 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 95.1%
associate-*r*95.2%
*-commutative95.2%
associate-*l*95.1%
Simplified95.1%
*-commutative95.1%
sqrt-div95.0%
metadata-eval95.0%
un-div-inv95.2%
*-commutative95.2%
Applied egg-rr95.2%
if -6.6000000000000003e97 < y < 4.79999999999999996e82Initial 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%
Taylor expanded in y around 0 94.3%
Final simplification94.6%
(FPCore (x y)
:precision binary64
(if (<= y -3.3e+97)
(* (sqrt (/ 1.0 x)) (* y -0.3333333333333333))
(if (<= y 3.5e+84)
(+ 1.0 (* 0.1111111111111111 (/ -1.0 x)))
(/ (* y -0.3333333333333333) (sqrt x)))))
double code(double x, double y) {
double tmp;
if (y <= -3.3e+97) {
tmp = sqrt((1.0 / x)) * (y * -0.3333333333333333);
} else if (y <= 3.5e+84) {
tmp = 1.0 + (0.1111111111111111 * (-1.0 / x));
} else {
tmp = (y * -0.3333333333333333) / 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.3d+97)) then
tmp = sqrt((1.0d0 / x)) * (y * (-0.3333333333333333d0))
else if (y <= 3.5d+84) then
tmp = 1.0d0 + (0.1111111111111111d0 * ((-1.0d0) / x))
else
tmp = (y * (-0.3333333333333333d0)) / sqrt(x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -3.3e+97) {
tmp = Math.sqrt((1.0 / x)) * (y * -0.3333333333333333);
} else if (y <= 3.5e+84) {
tmp = 1.0 + (0.1111111111111111 * (-1.0 / x));
} else {
tmp = (y * -0.3333333333333333) / Math.sqrt(x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -3.3e+97: tmp = math.sqrt((1.0 / x)) * (y * -0.3333333333333333) elif y <= 3.5e+84: tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)) else: tmp = (y * -0.3333333333333333) / math.sqrt(x) return tmp
function code(x, y) tmp = 0.0 if (y <= -3.3e+97) tmp = Float64(sqrt(Float64(1.0 / x)) * Float64(y * -0.3333333333333333)); elseif (y <= 3.5e+84) tmp = Float64(1.0 + Float64(0.1111111111111111 * Float64(-1.0 / x))); else tmp = Float64(Float64(y * -0.3333333333333333) / sqrt(x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -3.3e+97) tmp = sqrt((1.0 / x)) * (y * -0.3333333333333333); elseif (y <= 3.5e+84) tmp = 1.0 + (0.1111111111111111 * (-1.0 / x)); else tmp = (y * -0.3333333333333333) / sqrt(x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -3.3e+97], N[(N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision] * N[(y * -0.3333333333333333), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e+84], N[(1.0 + N[(0.1111111111111111 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{+97}:\\
\;\;\;\;\sqrt{\frac{1}{x}} \cdot \left(y \cdot -0.3333333333333333\right)\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{+84}:\\
\;\;\;\;1 + 0.1111111111111111 \cdot \frac{-1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -3.3000000000000001e97Initial 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.7%
associate-*r*94.7%
*-commutative94.7%
associate-*l*94.8%
Simplified94.8%
if -3.3000000000000001e97 < y < 3.4999999999999999e84Initial 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%
Taylor expanded in y around 0 94.3%
if 3.4999999999999999e84 < y Initial program 99.4%
*-commutative99.4%
metadata-eval99.4%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
Taylor expanded in y around inf 95.4%
associate-*r*95.6%
*-commutative95.6%
associate-*l*95.4%
Simplified95.4%
*-commutative95.4%
sqrt-div95.3%
metadata-eval95.3%
un-div-inv95.6%
*-commutative95.6%
Applied egg-rr95.6%
Final simplification94.6%
(FPCore (x y) :precision binary64 (if (<= x 0.11) (/ (+ 0.1111111111111111 (* y (* 0.3333333333333333 (sqrt x)))) (- x)) (- 1.0 (/ (/ y (sqrt x)) 3.0))))
double code(double x, double y) {
double tmp;
if (x <= 0.11) {
tmp = (0.1111111111111111 + (y * (0.3333333333333333 * sqrt(x)))) / -x;
} else {
tmp = 1.0 - ((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 (x <= 0.11d0) then
tmp = (0.1111111111111111d0 + (y * (0.3333333333333333d0 * sqrt(x)))) / -x
else
tmp = 1.0d0 - ((y / sqrt(x)) / 3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.11) {
tmp = (0.1111111111111111 + (y * (0.3333333333333333 * Math.sqrt(x)))) / -x;
} else {
tmp = 1.0 - ((y / Math.sqrt(x)) / 3.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.11: tmp = (0.1111111111111111 + (y * (0.3333333333333333 * math.sqrt(x)))) / -x else: tmp = 1.0 - ((y / math.sqrt(x)) / 3.0) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.11) tmp = Float64(Float64(0.1111111111111111 + Float64(y * Float64(0.3333333333333333 * sqrt(x)))) / Float64(-x)); else tmp = Float64(1.0 - Float64(Float64(y / sqrt(x)) / 3.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.11) tmp = (0.1111111111111111 + (y * (0.3333333333333333 * sqrt(x)))) / -x; else tmp = 1.0 - ((y / sqrt(x)) / 3.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.11], N[(N[(0.1111111111111111 + N[(y * N[(0.3333333333333333 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / (-x)), $MachinePrecision], N[(1.0 - N[(N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.11:\\
\;\;\;\;\frac{0.1111111111111111 + y \cdot \left(0.3333333333333333 \cdot \sqrt{x}\right)}{-x}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{y}{\sqrt{x}}}{3}\\
\end{array}
\end{array}
if x < 0.110000000000000001Initial program 99.5%
*-commutative99.5%
metadata-eval99.5%
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 98.3%
mul-1-neg98.3%
associate-*r*98.3%
Simplified98.3%
if 0.110000000000000001 < x Initial program 99.8%
Taylor expanded in x around inf 97.8%
*-commutative97.8%
sqrt-div97.8%
metadata-eval97.8%
div-inv97.8%
clear-num97.8%
Applied egg-rr97.8%
un-div-inv97.8%
associate-/r/97.7%
metadata-eval97.7%
sqrt-div97.8%
clear-num97.8%
sqrt-div97.8%
metadata-eval97.8%
div-inv97.8%
metadata-eval97.8%
associate-/r/97.8%
clear-num97.9%
sqrt-prod97.9%
associate-/r*97.9%
metadata-eval97.9%
Applied egg-rr97.9%
Final simplification98.2%
(FPCore (x y) :precision binary64 (if (<= x 0.11) (/ (- (* -0.3333333333333333 (* y (sqrt x))) 0.1111111111111111) x) (- 1.0 (/ (/ y (sqrt x)) 3.0))))
double code(double x, double y) {
double tmp;
if (x <= 0.11) {
tmp = ((-0.3333333333333333 * (y * sqrt(x))) - 0.1111111111111111) / x;
} else {
tmp = 1.0 - ((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 (x <= 0.11d0) then
tmp = (((-0.3333333333333333d0) * (y * sqrt(x))) - 0.1111111111111111d0) / x
else
tmp = 1.0d0 - ((y / sqrt(x)) / 3.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.11) {
tmp = ((-0.3333333333333333 * (y * Math.sqrt(x))) - 0.1111111111111111) / x;
} else {
tmp = 1.0 - ((y / Math.sqrt(x)) / 3.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.11: tmp = ((-0.3333333333333333 * (y * math.sqrt(x))) - 0.1111111111111111) / x else: tmp = 1.0 - ((y / math.sqrt(x)) / 3.0) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.11) tmp = Float64(Float64(Float64(-0.3333333333333333 * Float64(y * sqrt(x))) - 0.1111111111111111) / x); else tmp = Float64(1.0 - Float64(Float64(y / sqrt(x)) / 3.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.11) tmp = ((-0.3333333333333333 * (y * sqrt(x))) - 0.1111111111111111) / x; else tmp = 1.0 - ((y / sqrt(x)) / 3.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.11], N[(N[(N[(-0.3333333333333333 * N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.1111111111111111), $MachinePrecision] / x), $MachinePrecision], N[(1.0 - N[(N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.11:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot \left(y \cdot \sqrt{x}\right) - 0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{\frac{y}{\sqrt{x}}}{3}\\
\end{array}
\end{array}
if x < 0.110000000000000001Initial program 99.5%
sub-neg99.5%
*-commutative99.5%
associate-/r*99.4%
metadata-eval99.4%
distribute-frac-neg99.4%
neg-mul-199.4%
times-frac99.4%
metadata-eval99.4%
Simplified99.4%
clear-num99.4%
un-div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 98.3%
if 0.110000000000000001 < x Initial program 99.8%
Taylor expanded in x around inf 97.8%
*-commutative97.8%
sqrt-div97.8%
metadata-eval97.8%
div-inv97.8%
clear-num97.8%
Applied egg-rr97.8%
un-div-inv97.8%
associate-/r/97.7%
metadata-eval97.7%
sqrt-div97.8%
clear-num97.8%
sqrt-div97.8%
metadata-eval97.8%
div-inv97.8%
metadata-eval97.8%
associate-/r/97.8%
clear-num97.9%
sqrt-prod97.9%
associate-/r*97.9%
metadata-eval97.9%
Applied egg-rr97.9%
Final simplification98.1%
(FPCore (x y) :precision binary64 (+ 1.0 (+ (/ -0.1111111111111111 x) (/ y (* (sqrt x) -3.0)))))
double code(double x, double y) {
return 1.0 + ((-0.1111111111111111 / x) + (y / (sqrt(x) * -3.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) * (-3.0d0))))
end function
public static double code(double x, double y) {
return 1.0 + ((-0.1111111111111111 / x) + (y / (Math.sqrt(x) * -3.0)));
}
def code(x, y): return 1.0 + ((-0.1111111111111111 / x) + (y / (math.sqrt(x) * -3.0)))
function code(x, y) return Float64(1.0 + Float64(Float64(-0.1111111111111111 / x) + Float64(y / Float64(sqrt(x) * -3.0)))) end
function tmp = code(x, y) tmp = 1.0 + ((-0.1111111111111111 / x) + (y / (sqrt(x) * -3.0))); end
code[x_, y_] := N[(1.0 + N[(N[(-0.1111111111111111 / x), $MachinePrecision] + N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \left(\frac{-0.1111111111111111}{x} + \frac{y}{\sqrt{x} \cdot -3}\right)
\end{array}
Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
sub-neg99.7%
sub-neg99.7%
associate-+l+99.7%
metadata-eval99.7%
div-inv99.6%
clear-num99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
distribute-neg-frac299.6%
sqrt-prod99.6%
distribute-rgt-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
Applied egg-rr99.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(1.0 - Float64(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[(1.0 - N[(N[(0.1111111111111111 / x), $MachinePrecision] + N[(N[(y * 0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 - \left(\frac{0.1111111111111111}{x} + \frac{y \cdot 0.3333333333333333}{\sqrt{x}}\right)
\end{array}
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.6%
associate--l-99.6%
sub-neg99.6%
div-inv99.6%
*-commutative99.6%
metadata-eval99.6%
metadata-eval99.6%
div-inv99.6%
sqrt-div99.6%
clear-num99.6%
sqrt-div99.5%
metadata-eval99.5%
associate-/r/99.6%
un-div-inv99.5%
*-commutative99.5%
clear-num99.6%
Applied egg-rr99.6%
unsub-neg99.6%
associate-*l/99.6%
Simplified99.6%
Final simplification99.6%
(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.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.6%
Final simplification99.6%
(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.6%
sub-neg99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
distribute-frac-neg99.6%
neg-mul-199.6%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 64.2%
Final simplification64.2%
(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%
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.6%
fma-neg99.6%
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 y around 0 64.2%
Final simplification64.2%
(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 2024059
(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)))))