
(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 19 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 (<= y -3.8e+55)
(+ 1.0 (/ (/ y (sqrt x)) -3.0))
(if (<= y 2.95e+57)
(+ 1.0 (/ (/ -1.0 x) 9.0))
(+ 1.0 (* y (/ (pow x -0.5) -3.0))))))
double code(double x, double y) {
double tmp;
if (y <= -3.8e+55) {
tmp = 1.0 + ((y / sqrt(x)) / -3.0);
} else if (y <= 2.95e+57) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = 1.0 + (y * (pow(x, -0.5) / -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 <= (-3.8d+55)) then
tmp = 1.0d0 + ((y / sqrt(x)) / (-3.0d0))
else if (y <= 2.95d+57) then
tmp = 1.0d0 + (((-1.0d0) / x) / 9.0d0)
else
tmp = 1.0d0 + (y * ((x ** (-0.5d0)) / (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -3.8e+55) {
tmp = 1.0 + ((y / Math.sqrt(x)) / -3.0);
} else if (y <= 2.95e+57) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = 1.0 + (y * (Math.pow(x, -0.5) / -3.0));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -3.8e+55: tmp = 1.0 + ((y / math.sqrt(x)) / -3.0) elif y <= 2.95e+57: tmp = 1.0 + ((-1.0 / x) / 9.0) else: tmp = 1.0 + (y * (math.pow(x, -0.5) / -3.0)) return tmp
function code(x, y) tmp = 0.0 if (y <= -3.8e+55) tmp = Float64(1.0 + Float64(Float64(y / sqrt(x)) / -3.0)); elseif (y <= 2.95e+57) tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)); else tmp = Float64(1.0 + Float64(y * Float64((x ^ -0.5) / -3.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -3.8e+55) tmp = 1.0 + ((y / sqrt(x)) / -3.0); elseif (y <= 2.95e+57) tmp = 1.0 + ((-1.0 / x) / 9.0); else tmp = 1.0 + (y * ((x ^ -0.5) / -3.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -3.8e+55], N[(1.0 + N[(N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.95e+57], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(y * N[(N[Power[x, -0.5], $MachinePrecision] / -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+55}:\\
\;\;\;\;1 + \frac{\frac{y}{\sqrt{x}}}{-3}\\
\mathbf{elif}\;y \leq 2.95 \cdot 10^{+57}:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\mathbf{else}:\\
\;\;\;\;1 + y \cdot \frac{{x}^{-0.5}}{-3}\\
\end{array}
\end{array}
if y < -3.8e55Initial program 99.7%
associate--l-99.7%
+-commutative99.7%
associate--r+99.7%
sub-neg99.7%
distribute-frac-neg99.7%
associate-+r-99.7%
neg-mul-199.7%
associate-*l/99.6%
fma-neg99.6%
associate-/r*99.4%
metadata-eval99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 94.4%
*-commutative94.4%
associate-*l*94.4%
*-commutative94.4%
Simplified94.4%
associate-*r*94.2%
metadata-eval94.2%
div-inv94.5%
associate-*l/94.5%
inv-pow94.5%
sqrt-pow194.6%
metadata-eval94.6%
Applied egg-rr94.6%
associate-/l*94.5%
associate-/r/94.5%
Simplified94.5%
*-commutative94.5%
associate-*r/94.6%
metadata-eval94.6%
sqrt-pow194.5%
inv-pow94.5%
sqrt-div94.5%
metadata-eval94.5%
div-inv94.5%
Applied egg-rr94.5%
if -3.8e55 < y < 2.95000000000000006e57Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.4%
*-commutative97.4%
inv-pow97.4%
metadata-eval97.4%
pow-prod-up97.3%
metadata-eval97.3%
swap-sqr97.2%
metadata-eval97.2%
div-inv97.3%
metadata-eval97.3%
div-inv97.2%
frac-times97.2%
pow-prod-up97.5%
metadata-eval97.5%
inv-pow97.5%
metadata-eval97.5%
Applied egg-rr97.5%
if 2.95000000000000006e57 < y Initial program 99.4%
associate--l-99.4%
+-commutative99.4%
associate--r+99.4%
sub-neg99.4%
distribute-frac-neg99.4%
associate-+r-99.4%
neg-mul-199.4%
associate-*l/99.3%
fma-neg99.3%
associate-/r*99.5%
metadata-eval99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 93.7%
*-commutative93.7%
associate-*l*93.8%
*-commutative93.8%
Simplified93.8%
associate-*r*93.8%
metadata-eval93.8%
div-inv94.0%
associate-*l/93.9%
inv-pow93.9%
sqrt-pow194.0%
metadata-eval94.0%
Applied egg-rr94.0%
associate-/l*93.7%
associate-/r/94.0%
Simplified94.0%
Final simplification96.1%
(FPCore (x y)
:precision binary64
(if (<= y -8e+55)
(- 1.0 (/ y (* (sqrt x) 3.0)))
(if (<= y 3.75e+58)
(+ 1.0 (/ (/ -1.0 x) 9.0))
(+ 1.0 (* y (/ (pow x -0.5) -3.0))))))
double code(double x, double y) {
double tmp;
if (y <= -8e+55) {
tmp = 1.0 - (y / (sqrt(x) * 3.0));
} else if (y <= 3.75e+58) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = 1.0 + (y * (pow(x, -0.5) / -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 <= (-8d+55)) then
tmp = 1.0d0 - (y / (sqrt(x) * 3.0d0))
else if (y <= 3.75d+58) then
tmp = 1.0d0 + (((-1.0d0) / x) / 9.0d0)
else
tmp = 1.0d0 + (y * ((x ** (-0.5d0)) / (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -8e+55) {
tmp = 1.0 - (y / (Math.sqrt(x) * 3.0));
} else if (y <= 3.75e+58) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = 1.0 + (y * (Math.pow(x, -0.5) / -3.0));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -8e+55: tmp = 1.0 - (y / (math.sqrt(x) * 3.0)) elif y <= 3.75e+58: tmp = 1.0 + ((-1.0 / x) / 9.0) else: tmp = 1.0 + (y * (math.pow(x, -0.5) / -3.0)) return tmp
function code(x, y) tmp = 0.0 if (y <= -8e+55) tmp = Float64(1.0 - Float64(y / Float64(sqrt(x) * 3.0))); elseif (y <= 3.75e+58) tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)); else tmp = Float64(1.0 + Float64(y * Float64((x ^ -0.5) / -3.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -8e+55) tmp = 1.0 - (y / (sqrt(x) * 3.0)); elseif (y <= 3.75e+58) tmp = 1.0 + ((-1.0 / x) / 9.0); else tmp = 1.0 + (y * ((x ^ -0.5) / -3.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -8e+55], N[(1.0 - N[(y / N[(N[Sqrt[x], $MachinePrecision] * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.75e+58], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(y * N[(N[Power[x, -0.5], $MachinePrecision] / -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+55}:\\
\;\;\;\;1 - \frac{y}{\sqrt{x} \cdot 3}\\
\mathbf{elif}\;y \leq 3.75 \cdot 10^{+58}:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\mathbf{else}:\\
\;\;\;\;1 + y \cdot \frac{{x}^{-0.5}}{-3}\\
\end{array}
\end{array}
if y < -8.00000000000000008e55Initial program 99.7%
associate--l-99.7%
+-commutative99.7%
associate--r+99.7%
sub-neg99.7%
distribute-frac-neg99.7%
associate-+r-99.7%
neg-mul-199.7%
associate-*l/99.6%
fma-neg99.6%
associate-/r*99.4%
metadata-eval99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 94.4%
*-commutative94.4%
associate-*l*94.4%
*-commutative94.4%
Simplified94.4%
associate-*r*94.2%
metadata-eval94.2%
div-inv94.5%
sqrt-div94.5%
metadata-eval94.5%
associate-/r*94.6%
frac-2neg94.6%
metadata-eval94.6%
*-commutative94.6%
distribute-lft-neg-in94.6%
metadata-eval94.6%
associate-*l/94.7%
neg-mul-194.7%
Applied egg-rr94.7%
if -8.00000000000000008e55 < y < 3.75e58Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.4%
*-commutative97.4%
inv-pow97.4%
metadata-eval97.4%
pow-prod-up97.3%
metadata-eval97.3%
swap-sqr97.2%
metadata-eval97.2%
div-inv97.3%
metadata-eval97.3%
div-inv97.2%
frac-times97.2%
pow-prod-up97.5%
metadata-eval97.5%
inv-pow97.5%
metadata-eval97.5%
Applied egg-rr97.5%
if 3.75e58 < y Initial program 99.4%
associate--l-99.4%
+-commutative99.4%
associate--r+99.4%
sub-neg99.4%
distribute-frac-neg99.4%
associate-+r-99.4%
neg-mul-199.4%
associate-*l/99.3%
fma-neg99.3%
associate-/r*99.5%
metadata-eval99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 93.7%
*-commutative93.7%
associate-*l*93.8%
*-commutative93.8%
Simplified93.8%
associate-*r*93.8%
metadata-eval93.8%
div-inv94.0%
associate-*l/93.9%
inv-pow93.9%
sqrt-pow194.0%
metadata-eval94.0%
Applied egg-rr94.0%
associate-/l*93.7%
associate-/r/94.0%
Simplified94.0%
Final simplification96.2%
(FPCore (x y) :precision binary64 (if (or (<= y -4.1e+55) (not (<= y 4e+60))) (+ 1.0 (* y (/ -0.3333333333333333 (sqrt x)))) (+ 1.0 (/ (/ -1.0 x) 9.0))))
double code(double x, double y) {
double tmp;
if ((y <= -4.1e+55) || !(y <= 4e+60)) {
tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x)));
} else {
tmp = 1.0 + ((-1.0 / 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 <= (-4.1d+55)) .or. (.not. (y <= 4d+60))) then
tmp = 1.0d0 + (y * ((-0.3333333333333333d0) / sqrt(x)))
else
tmp = 1.0d0 + (((-1.0d0) / x) / 9.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -4.1e+55) || !(y <= 4e+60)) {
tmp = 1.0 + (y * (-0.3333333333333333 / Math.sqrt(x)));
} else {
tmp = 1.0 + ((-1.0 / x) / 9.0);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -4.1e+55) or not (y <= 4e+60): tmp = 1.0 + (y * (-0.3333333333333333 / math.sqrt(x))) else: tmp = 1.0 + ((-1.0 / x) / 9.0) return tmp
function code(x, y) tmp = 0.0 if ((y <= -4.1e+55) || !(y <= 4e+60)) tmp = Float64(1.0 + Float64(y * Float64(-0.3333333333333333 / sqrt(x)))); else tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -4.1e+55) || ~((y <= 4e+60))) tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x))); else tmp = 1.0 + ((-1.0 / x) / 9.0); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -4.1e+55], N[Not[LessEqual[y, 4e+60]], $MachinePrecision]], N[(1.0 + N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{+55} \lor \neg \left(y \leq 4 \cdot 10^{+60}\right):\\
\;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\end{array}
\end{array}
if y < -4.09999999999999981e55 or 3.9999999999999998e60 < y Initial program 99.6%
associate--l-99.6%
+-commutative99.6%
associate--r+99.6%
sub-neg99.6%
distribute-frac-neg99.6%
associate-+r-99.6%
neg-mul-199.6%
associate-*l/99.4%
fma-neg99.4%
associate-/r*99.4%
metadata-eval99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 94.0%
*-commutative94.0%
associate-*l*94.1%
*-commutative94.1%
Simplified94.1%
associate-*r*94.0%
metadata-eval94.0%
div-inv94.2%
associate-*l/94.2%
inv-pow94.2%
sqrt-pow194.2%
metadata-eval94.2%
Applied egg-rr94.2%
associate-/l*94.1%
associate-/r/94.2%
Simplified94.2%
expm1-log1p-u49.3%
expm1-udef9.5%
clear-num9.5%
associate-/r/9.5%
metadata-eval9.5%
metadata-eval9.5%
sqrt-pow19.5%
inv-pow9.5%
sqrt-div9.5%
metadata-eval9.5%
div-inv9.5%
Applied egg-rr9.5%
expm1-def49.2%
expm1-log1p94.1%
Simplified94.1%
if -4.09999999999999981e55 < y < 3.9999999999999998e60Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.4%
*-commutative97.4%
inv-pow97.4%
metadata-eval97.4%
pow-prod-up97.3%
metadata-eval97.3%
swap-sqr97.2%
metadata-eval97.2%
div-inv97.3%
metadata-eval97.3%
div-inv97.2%
frac-times97.2%
pow-prod-up97.5%
metadata-eval97.5%
inv-pow97.5%
metadata-eval97.5%
Applied egg-rr97.5%
Final simplification96.1%
(FPCore (x y) :precision binary64 (if (or (<= y -6.4e+55) (not (<= y 5.2e+63))) (+ 1.0 (* -0.3333333333333333 (/ y (sqrt x)))) (+ 1.0 (/ (/ -1.0 x) 9.0))))
double code(double x, double y) {
double tmp;
if ((y <= -6.4e+55) || !(y <= 5.2e+63)) {
tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x)));
} else {
tmp = 1.0 + ((-1.0 / 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 <= (-6.4d+55)) .or. (.not. (y <= 5.2d+63))) then
tmp = 1.0d0 + ((-0.3333333333333333d0) * (y / sqrt(x)))
else
tmp = 1.0d0 + (((-1.0d0) / x) / 9.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -6.4e+55) || !(y <= 5.2e+63)) {
tmp = 1.0 + (-0.3333333333333333 * (y / Math.sqrt(x)));
} else {
tmp = 1.0 + ((-1.0 / x) / 9.0);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -6.4e+55) or not (y <= 5.2e+63): tmp = 1.0 + (-0.3333333333333333 * (y / math.sqrt(x))) else: tmp = 1.0 + ((-1.0 / x) / 9.0) return tmp
function code(x, y) tmp = 0.0 if ((y <= -6.4e+55) || !(y <= 5.2e+63)) tmp = Float64(1.0 + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))); else tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -6.4e+55) || ~((y <= 5.2e+63))) tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x))); else tmp = 1.0 + ((-1.0 / x) / 9.0); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -6.4e+55], N[Not[LessEqual[y, 5.2e+63]], $MachinePrecision]], N[(1.0 + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.4 \cdot 10^{+55} \lor \neg \left(y \leq 5.2 \cdot 10^{+63}\right):\\
\;\;\;\;1 + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\end{array}
\end{array}
if y < -6.4000000000000005e55 or 5.2000000000000002e63 < y Initial program 99.6%
associate--l-99.6%
+-commutative99.6%
associate--r+99.6%
sub-neg99.6%
distribute-frac-neg99.6%
associate-+r-99.6%
neg-mul-199.6%
associate-*l/99.4%
fma-neg99.4%
associate-/r*99.4%
metadata-eval99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 94.0%
*-commutative94.0%
associate-*l*94.1%
*-commutative94.1%
Simplified94.1%
associate-*r*94.0%
metadata-eval94.0%
div-inv94.2%
associate-*l/94.2%
inv-pow94.2%
sqrt-pow194.2%
metadata-eval94.2%
Applied egg-rr94.2%
associate-/l*94.1%
associate-/r/94.2%
Simplified94.2%
*-commutative94.2%
associate-*r/94.2%
metadata-eval94.2%
sqrt-pow194.2%
inv-pow94.2%
sqrt-div94.2%
metadata-eval94.2%
div-inv94.2%
Applied egg-rr94.2%
div-inv94.1%
metadata-eval94.1%
Applied egg-rr94.1%
if -6.4000000000000005e55 < y < 5.2000000000000002e63Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.4%
*-commutative97.4%
inv-pow97.4%
metadata-eval97.4%
pow-prod-up97.3%
metadata-eval97.3%
swap-sqr97.2%
metadata-eval97.2%
div-inv97.3%
metadata-eval97.3%
div-inv97.2%
frac-times97.2%
pow-prod-up97.5%
metadata-eval97.5%
inv-pow97.5%
metadata-eval97.5%
Applied egg-rr97.5%
Final simplification96.1%
(FPCore (x y) :precision binary64 (if (or (<= y -5.8e+55) (not (<= y 3e+57))) (+ 1.0 (/ (/ y (sqrt x)) -3.0)) (+ 1.0 (/ (/ -1.0 x) 9.0))))
double code(double x, double y) {
double tmp;
if ((y <= -5.8e+55) || !(y <= 3e+57)) {
tmp = 1.0 + ((y / sqrt(x)) / -3.0);
} else {
tmp = 1.0 + ((-1.0 / 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 <= (-5.8d+55)) .or. (.not. (y <= 3d+57))) then
tmp = 1.0d0 + ((y / sqrt(x)) / (-3.0d0))
else
tmp = 1.0d0 + (((-1.0d0) / x) / 9.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -5.8e+55) || !(y <= 3e+57)) {
tmp = 1.0 + ((y / Math.sqrt(x)) / -3.0);
} else {
tmp = 1.0 + ((-1.0 / x) / 9.0);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -5.8e+55) or not (y <= 3e+57): tmp = 1.0 + ((y / math.sqrt(x)) / -3.0) else: tmp = 1.0 + ((-1.0 / x) / 9.0) return tmp
function code(x, y) tmp = 0.0 if ((y <= -5.8e+55) || !(y <= 3e+57)) tmp = Float64(1.0 + Float64(Float64(y / sqrt(x)) / -3.0)); else tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -5.8e+55) || ~((y <= 3e+57))) tmp = 1.0 + ((y / sqrt(x)) / -3.0); else tmp = 1.0 + ((-1.0 / x) / 9.0); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -5.8e+55], N[Not[LessEqual[y, 3e+57]], $MachinePrecision]], N[(1.0 + N[(N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / -3.0), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+55} \lor \neg \left(y \leq 3 \cdot 10^{+57}\right):\\
\;\;\;\;1 + \frac{\frac{y}{\sqrt{x}}}{-3}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\end{array}
\end{array}
if y < -5.7999999999999997e55 or 3e57 < y Initial program 99.6%
associate--l-99.6%
+-commutative99.6%
associate--r+99.6%
sub-neg99.6%
distribute-frac-neg99.6%
associate-+r-99.6%
neg-mul-199.6%
associate-*l/99.4%
fma-neg99.4%
associate-/r*99.4%
metadata-eval99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 94.0%
*-commutative94.0%
associate-*l*94.1%
*-commutative94.1%
Simplified94.1%
associate-*r*94.0%
metadata-eval94.0%
div-inv94.2%
associate-*l/94.2%
inv-pow94.2%
sqrt-pow194.2%
metadata-eval94.2%
Applied egg-rr94.2%
associate-/l*94.1%
associate-/r/94.2%
Simplified94.2%
*-commutative94.2%
associate-*r/94.2%
metadata-eval94.2%
sqrt-pow194.2%
inv-pow94.2%
sqrt-div94.2%
metadata-eval94.2%
div-inv94.2%
Applied egg-rr94.2%
if -5.7999999999999997e55 < y < 3e57Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.4%
*-commutative97.4%
inv-pow97.4%
metadata-eval97.4%
pow-prod-up97.3%
metadata-eval97.3%
swap-sqr97.2%
metadata-eval97.2%
div-inv97.3%
metadata-eval97.3%
div-inv97.2%
frac-times97.2%
pow-prod-up97.5%
metadata-eval97.5%
inv-pow97.5%
metadata-eval97.5%
Applied egg-rr97.5%
Final simplification96.1%
(FPCore (x y)
:precision binary64
(if (<= y -8.6e+55)
(+ 1.0 (/ -0.3333333333333333 (/ (sqrt x) y)))
(if (<= y 3.3e+61)
(+ 1.0 (/ (/ -1.0 x) 9.0))
(+ 1.0 (* -0.3333333333333333 (/ y (sqrt x)))))))
double code(double x, double y) {
double tmp;
if (y <= -8.6e+55) {
tmp = 1.0 + (-0.3333333333333333 / (sqrt(x) / y));
} else if (y <= 3.3e+61) {
tmp = 1.0 + ((-1.0 / x) / 9.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 <= (-8.6d+55)) then
tmp = 1.0d0 + ((-0.3333333333333333d0) / (sqrt(x) / y))
else if (y <= 3.3d+61) then
tmp = 1.0d0 + (((-1.0d0) / x) / 9.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 <= -8.6e+55) {
tmp = 1.0 + (-0.3333333333333333 / (Math.sqrt(x) / y));
} else if (y <= 3.3e+61) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = 1.0 + (-0.3333333333333333 * (y / Math.sqrt(x)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -8.6e+55: tmp = 1.0 + (-0.3333333333333333 / (math.sqrt(x) / y)) elif y <= 3.3e+61: tmp = 1.0 + ((-1.0 / x) / 9.0) else: tmp = 1.0 + (-0.3333333333333333 * (y / math.sqrt(x))) return tmp
function code(x, y) tmp = 0.0 if (y <= -8.6e+55) tmp = Float64(1.0 + Float64(-0.3333333333333333 / Float64(sqrt(x) / y))); elseif (y <= 3.3e+61) tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.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 <= -8.6e+55) tmp = 1.0 + (-0.3333333333333333 / (sqrt(x) / y)); elseif (y <= 3.3e+61) tmp = 1.0 + ((-1.0 / x) / 9.0); else tmp = 1.0 + (-0.3333333333333333 * (y / sqrt(x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -8.6e+55], N[(1.0 + N[(-0.3333333333333333 / N[(N[Sqrt[x], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e+61], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.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 -8.6 \cdot 10^{+55}:\\
\;\;\;\;1 + \frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{+61}:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\mathbf{else}:\\
\;\;\;\;1 + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -8.5999999999999998e55Initial program 99.7%
associate--l-99.7%
+-commutative99.7%
associate--r+99.7%
sub-neg99.7%
distribute-frac-neg99.7%
associate-+r-99.7%
neg-mul-199.7%
associate-*l/99.6%
fma-neg99.6%
associate-/r*99.4%
metadata-eval99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 94.4%
*-commutative94.4%
associate-*l*94.4%
*-commutative94.4%
Simplified94.4%
associate-*r*94.2%
metadata-eval94.2%
div-inv94.5%
associate-*l/94.5%
inv-pow94.5%
sqrt-pow194.6%
metadata-eval94.6%
Applied egg-rr94.6%
associate-/l*94.5%
associate-/r/94.5%
Simplified94.5%
associate-*l/94.6%
clear-num94.5%
metadata-eval94.5%
sqrt-pow194.5%
inv-pow94.5%
sqrt-div94.5%
metadata-eval94.5%
associate-/r/94.4%
clear-num94.4%
Applied egg-rr94.4%
associate-/r/94.4%
metadata-eval94.4%
associate-*r/94.4%
associate-/l*94.5%
Simplified94.5%
if -8.5999999999999998e55 < y < 3.2999999999999998e61Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.4%
*-commutative97.4%
inv-pow97.4%
metadata-eval97.4%
pow-prod-up97.3%
metadata-eval97.3%
swap-sqr97.2%
metadata-eval97.2%
div-inv97.3%
metadata-eval97.3%
div-inv97.2%
frac-times97.2%
pow-prod-up97.5%
metadata-eval97.5%
inv-pow97.5%
metadata-eval97.5%
Applied egg-rr97.5%
if 3.2999999999999998e61 < y Initial program 99.4%
associate--l-99.4%
+-commutative99.4%
associate--r+99.4%
sub-neg99.4%
distribute-frac-neg99.4%
associate-+r-99.4%
neg-mul-199.4%
associate-*l/99.3%
fma-neg99.3%
associate-/r*99.5%
metadata-eval99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 93.7%
*-commutative93.7%
associate-*l*93.8%
*-commutative93.8%
Simplified93.8%
associate-*r*93.8%
metadata-eval93.8%
div-inv94.0%
associate-*l/93.9%
inv-pow93.9%
sqrt-pow194.0%
metadata-eval94.0%
Applied egg-rr94.0%
associate-/l*93.7%
associate-/r/94.0%
Simplified94.0%
*-commutative94.0%
associate-*r/94.0%
metadata-eval94.0%
sqrt-pow193.9%
inv-pow93.9%
sqrt-div93.9%
metadata-eval93.9%
div-inv93.9%
Applied egg-rr93.9%
div-inv93.9%
metadata-eval93.9%
Applied egg-rr93.9%
Final simplification96.1%
(FPCore (x y)
:precision binary64
(if (<= y -8.5e+55)
(+ 1.0 (/ -0.3333333333333333 (/ (sqrt x) y)))
(if (<= y 2.85e+63)
(+ 1.0 (/ (/ -1.0 x) 9.0))
(+ 1.0 (/ (* y -0.3333333333333333) (sqrt x))))))
double code(double x, double y) {
double tmp;
if (y <= -8.5e+55) {
tmp = 1.0 + (-0.3333333333333333 / (sqrt(x) / y));
} else if (y <= 2.85e+63) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = 1.0 + ((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 <= (-8.5d+55)) then
tmp = 1.0d0 + ((-0.3333333333333333d0) / (sqrt(x) / y))
else if (y <= 2.85d+63) then
tmp = 1.0d0 + (((-1.0d0) / x) / 9.0d0)
else
tmp = 1.0d0 + ((y * (-0.3333333333333333d0)) / sqrt(x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -8.5e+55) {
tmp = 1.0 + (-0.3333333333333333 / (Math.sqrt(x) / y));
} else if (y <= 2.85e+63) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = 1.0 + ((y * -0.3333333333333333) / Math.sqrt(x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -8.5e+55: tmp = 1.0 + (-0.3333333333333333 / (math.sqrt(x) / y)) elif y <= 2.85e+63: tmp = 1.0 + ((-1.0 / x) / 9.0) else: tmp = 1.0 + ((y * -0.3333333333333333) / math.sqrt(x)) return tmp
function code(x, y) tmp = 0.0 if (y <= -8.5e+55) tmp = Float64(1.0 + Float64(-0.3333333333333333 / Float64(sqrt(x) / y))); elseif (y <= 2.85e+63) tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)); else tmp = Float64(1.0 + Float64(Float64(y * -0.3333333333333333) / sqrt(x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -8.5e+55) tmp = 1.0 + (-0.3333333333333333 / (sqrt(x) / y)); elseif (y <= 2.85e+63) tmp = 1.0 + ((-1.0 / x) / 9.0); else tmp = 1.0 + ((y * -0.3333333333333333) / sqrt(x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -8.5e+55], N[(1.0 + N[(-0.3333333333333333 / N[(N[Sqrt[x], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.85e+63], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+55}:\\
\;\;\;\;1 + \frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}\\
\mathbf{elif}\;y \leq 2.85 \cdot 10^{+63}:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -8.50000000000000002e55Initial program 99.7%
associate--l-99.7%
+-commutative99.7%
associate--r+99.7%
sub-neg99.7%
distribute-frac-neg99.7%
associate-+r-99.7%
neg-mul-199.7%
associate-*l/99.6%
fma-neg99.6%
associate-/r*99.4%
metadata-eval99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 94.4%
*-commutative94.4%
associate-*l*94.4%
*-commutative94.4%
Simplified94.4%
associate-*r*94.2%
metadata-eval94.2%
div-inv94.5%
associate-*l/94.5%
inv-pow94.5%
sqrt-pow194.6%
metadata-eval94.6%
Applied egg-rr94.6%
associate-/l*94.5%
associate-/r/94.5%
Simplified94.5%
associate-*l/94.6%
clear-num94.5%
metadata-eval94.5%
sqrt-pow194.5%
inv-pow94.5%
sqrt-div94.5%
metadata-eval94.5%
associate-/r/94.4%
clear-num94.4%
Applied egg-rr94.4%
associate-/r/94.4%
metadata-eval94.4%
associate-*r/94.4%
associate-/l*94.5%
Simplified94.5%
if -8.50000000000000002e55 < y < 2.8500000000000001e63Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.4%
*-commutative97.4%
inv-pow97.4%
metadata-eval97.4%
pow-prod-up97.3%
metadata-eval97.3%
swap-sqr97.2%
metadata-eval97.2%
div-inv97.3%
metadata-eval97.3%
div-inv97.2%
frac-times97.2%
pow-prod-up97.5%
metadata-eval97.5%
inv-pow97.5%
metadata-eval97.5%
Applied egg-rr97.5%
if 2.8500000000000001e63 < y Initial program 99.4%
associate--l-99.4%
+-commutative99.4%
associate--r+99.4%
sub-neg99.4%
distribute-frac-neg99.4%
associate-+r-99.4%
neg-mul-199.4%
associate-*l/99.3%
fma-neg99.3%
associate-/r*99.5%
metadata-eval99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 93.7%
*-commutative93.7%
associate-*l*93.8%
*-commutative93.8%
Simplified93.8%
*-commutative93.8%
sqrt-div93.9%
metadata-eval93.9%
un-div-inv93.9%
*-commutative93.9%
Applied egg-rr93.9%
Final simplification96.1%
(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%
distribute-frac-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
neg-mul-199.7%
times-frac99.6%
metadata-eval99.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.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
Final simplification99.7%
(FPCore (x y) :precision binary64 (if (or (<= y -8.6e+55) (not (<= y 6.2e+83))) (/ -0.3333333333333333 (/ (sqrt x) y)) (+ 1.0 (/ (/ -1.0 x) 9.0))))
double code(double x, double y) {
double tmp;
if ((y <= -8.6e+55) || !(y <= 6.2e+83)) {
tmp = -0.3333333333333333 / (sqrt(x) / y);
} else {
tmp = 1.0 + ((-1.0 / 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 <= (-8.6d+55)) .or. (.not. (y <= 6.2d+83))) then
tmp = (-0.3333333333333333d0) / (sqrt(x) / y)
else
tmp = 1.0d0 + (((-1.0d0) / x) / 9.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -8.6e+55) || !(y <= 6.2e+83)) {
tmp = -0.3333333333333333 / (Math.sqrt(x) / y);
} else {
tmp = 1.0 + ((-1.0 / x) / 9.0);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -8.6e+55) or not (y <= 6.2e+83): tmp = -0.3333333333333333 / (math.sqrt(x) / y) else: tmp = 1.0 + ((-1.0 / x) / 9.0) return tmp
function code(x, y) tmp = 0.0 if ((y <= -8.6e+55) || !(y <= 6.2e+83)) tmp = Float64(-0.3333333333333333 / Float64(sqrt(x) / y)); else tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -8.6e+55) || ~((y <= 6.2e+83))) tmp = -0.3333333333333333 / (sqrt(x) / y); else tmp = 1.0 + ((-1.0 / x) / 9.0); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -8.6e+55], N[Not[LessEqual[y, 6.2e+83]], $MachinePrecision]], N[(-0.3333333333333333 / N[(N[Sqrt[x], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.6 \cdot 10^{+55} \lor \neg \left(y \leq 6.2 \cdot 10^{+83}\right):\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\end{array}
\end{array}
if y < -8.5999999999999998e55 or 6.19999999999999984e83 < y Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in y around inf 88.1%
associate-*r*88.1%
*-commutative88.1%
*-commutative88.1%
Simplified88.1%
associate-*r*88.1%
sqrt-div88.1%
metadata-eval88.1%
div-inv88.2%
associate-*l/88.2%
*-commutative88.2%
associate-/l*88.2%
Applied egg-rr88.2%
if -8.5999999999999998e55 < y < 6.19999999999999984e83Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 97.3%
*-commutative97.3%
inv-pow97.3%
metadata-eval97.3%
pow-prod-up97.2%
metadata-eval97.2%
swap-sqr97.1%
metadata-eval97.1%
div-inv97.3%
metadata-eval97.3%
div-inv97.1%
frac-times97.2%
pow-prod-up97.4%
metadata-eval97.4%
inv-pow97.4%
metadata-eval97.4%
Applied egg-rr97.4%
Final simplification93.6%
(FPCore (x y)
:precision binary64
(if (<= y -8.6e+55)
(/ y (* (sqrt x) -3.0))
(if (<= y 4.6e+83)
(+ 1.0 (/ (/ -1.0 x) 9.0))
(/ -0.3333333333333333 (/ (sqrt x) y)))))
double code(double x, double y) {
double tmp;
if (y <= -8.6e+55) {
tmp = y / (sqrt(x) * -3.0);
} else if (y <= 4.6e+83) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = -0.3333333333333333 / (sqrt(x) / y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-8.6d+55)) then
tmp = y / (sqrt(x) * (-3.0d0))
else if (y <= 4.6d+83) then
tmp = 1.0d0 + (((-1.0d0) / x) / 9.0d0)
else
tmp = (-0.3333333333333333d0) / (sqrt(x) / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -8.6e+55) {
tmp = y / (Math.sqrt(x) * -3.0);
} else if (y <= 4.6e+83) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = -0.3333333333333333 / (Math.sqrt(x) / y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -8.6e+55: tmp = y / (math.sqrt(x) * -3.0) elif y <= 4.6e+83: tmp = 1.0 + ((-1.0 / x) / 9.0) else: tmp = -0.3333333333333333 / (math.sqrt(x) / y) return tmp
function code(x, y) tmp = 0.0 if (y <= -8.6e+55) tmp = Float64(y / Float64(sqrt(x) * -3.0)); elseif (y <= 4.6e+83) tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)); else tmp = Float64(-0.3333333333333333 / Float64(sqrt(x) / y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -8.6e+55) tmp = y / (sqrt(x) * -3.0); elseif (y <= 4.6e+83) tmp = 1.0 + ((-1.0 / x) / 9.0); else tmp = -0.3333333333333333 / (sqrt(x) / y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -8.6e+55], N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e+83], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 / N[(N[Sqrt[x], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.6 \cdot 10^{+55}:\\
\;\;\;\;\frac{y}{\sqrt{x} \cdot -3}\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+83}:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\mathbf{else}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}\\
\end{array}
\end{array}
if y < -8.5999999999999998e55Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in y around inf 87.4%
associate-*r*87.4%
*-commutative87.4%
*-commutative87.4%
Simplified87.4%
associate-*r*87.4%
sqrt-div87.5%
metadata-eval87.5%
div-inv87.4%
associate-/r/87.4%
div-inv87.8%
metadata-eval87.8%
Applied egg-rr87.8%
if -8.5999999999999998e55 < y < 4.5999999999999999e83Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 97.3%
*-commutative97.3%
inv-pow97.3%
metadata-eval97.3%
pow-prod-up97.2%
metadata-eval97.2%
swap-sqr97.1%
metadata-eval97.1%
div-inv97.3%
metadata-eval97.3%
div-inv97.1%
frac-times97.2%
pow-prod-up97.4%
metadata-eval97.4%
inv-pow97.4%
metadata-eval97.4%
Applied egg-rr97.4%
if 4.5999999999999999e83 < y Initial program 99.4%
*-commutative99.4%
metadata-eval99.4%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in y around inf 88.6%
associate-*r*88.7%
*-commutative88.7%
*-commutative88.7%
Simplified88.7%
associate-*r*88.6%
sqrt-div88.7%
metadata-eval88.7%
div-inv88.8%
associate-*l/88.8%
*-commutative88.8%
associate-/l*88.8%
Applied egg-rr88.8%
Final simplification93.7%
(FPCore (x y)
:precision binary64
(if (<= y -8.6e+55)
(/ y (* (sqrt x) -3.0))
(if (<= y 4.8e+83)
(+ 1.0 (/ (/ -1.0 x) 9.0))
(/ (* y -0.3333333333333333) (sqrt x)))))
double code(double x, double y) {
double tmp;
if (y <= -8.6e+55) {
tmp = y / (sqrt(x) * -3.0);
} else if (y <= 4.8e+83) {
tmp = 1.0 + ((-1.0 / x) / 9.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 <= (-8.6d+55)) then
tmp = y / (sqrt(x) * (-3.0d0))
else if (y <= 4.8d+83) then
tmp = 1.0d0 + (((-1.0d0) / x) / 9.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 <= -8.6e+55) {
tmp = y / (Math.sqrt(x) * -3.0);
} else if (y <= 4.8e+83) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = (y * -0.3333333333333333) / Math.sqrt(x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -8.6e+55: tmp = y / (math.sqrt(x) * -3.0) elif y <= 4.8e+83: tmp = 1.0 + ((-1.0 / x) / 9.0) else: tmp = (y * -0.3333333333333333) / math.sqrt(x) return tmp
function code(x, y) tmp = 0.0 if (y <= -8.6e+55) tmp = Float64(y / Float64(sqrt(x) * -3.0)); elseif (y <= 4.8e+83) tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.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 <= -8.6e+55) tmp = y / (sqrt(x) * -3.0); elseif (y <= 4.8e+83) tmp = 1.0 + ((-1.0 / x) / 9.0); else tmp = (y * -0.3333333333333333) / sqrt(x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -8.6e+55], N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e+83], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision], N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.6 \cdot 10^{+55}:\\
\;\;\;\;\frac{y}{\sqrt{x} \cdot -3}\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+83}:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -8.5999999999999998e55Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in y around inf 87.4%
associate-*r*87.4%
*-commutative87.4%
*-commutative87.4%
Simplified87.4%
associate-*r*87.4%
sqrt-div87.5%
metadata-eval87.5%
div-inv87.4%
associate-/r/87.4%
div-inv87.8%
metadata-eval87.8%
Applied egg-rr87.8%
if -8.5999999999999998e55 < y < 4.79999999999999982e83Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 97.3%
*-commutative97.3%
inv-pow97.3%
metadata-eval97.3%
pow-prod-up97.2%
metadata-eval97.2%
swap-sqr97.1%
metadata-eval97.1%
div-inv97.3%
metadata-eval97.3%
div-inv97.1%
frac-times97.2%
pow-prod-up97.4%
metadata-eval97.4%
inv-pow97.4%
metadata-eval97.4%
Applied egg-rr97.4%
if 4.79999999999999982e83 < y Initial program 99.4%
*-commutative99.4%
metadata-eval99.4%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in y around inf 88.6%
associate-*r*88.7%
*-commutative88.7%
*-commutative88.7%
Simplified88.7%
associate-*r*88.6%
sqrt-div88.7%
metadata-eval88.7%
div-inv88.8%
associate-*l/88.8%
Applied egg-rr88.8%
Final simplification93.7%
(FPCore (x y) :precision binary64 (if (<= y -8.5e+55) (/ y (* (sqrt x) -3.0)) (if (<= y 1.1e+83) (+ 1.0 (/ (/ -1.0 x) 9.0)) (/ (/ y -3.0) (sqrt x)))))
double code(double x, double y) {
double tmp;
if (y <= -8.5e+55) {
tmp = y / (sqrt(x) * -3.0);
} else if (y <= 1.1e+83) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = (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 <= (-8.5d+55)) then
tmp = y / (sqrt(x) * (-3.0d0))
else if (y <= 1.1d+83) then
tmp = 1.0d0 + (((-1.0d0) / x) / 9.0d0)
else
tmp = (y / (-3.0d0)) / sqrt(x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -8.5e+55) {
tmp = y / (Math.sqrt(x) * -3.0);
} else if (y <= 1.1e+83) {
tmp = 1.0 + ((-1.0 / x) / 9.0);
} else {
tmp = (y / -3.0) / Math.sqrt(x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -8.5e+55: tmp = y / (math.sqrt(x) * -3.0) elif y <= 1.1e+83: tmp = 1.0 + ((-1.0 / x) / 9.0) else: tmp = (y / -3.0) / math.sqrt(x) return tmp
function code(x, y) tmp = 0.0 if (y <= -8.5e+55) tmp = Float64(y / Float64(sqrt(x) * -3.0)); elseif (y <= 1.1e+83) tmp = Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)); else tmp = Float64(Float64(y / -3.0) / sqrt(x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -8.5e+55) tmp = y / (sqrt(x) * -3.0); elseif (y <= 1.1e+83) tmp = 1.0 + ((-1.0 / x) / 9.0); else tmp = (y / -3.0) / sqrt(x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -8.5e+55], N[(y / N[(N[Sqrt[x], $MachinePrecision] * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e+83], N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision], N[(N[(y / -3.0), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+55}:\\
\;\;\;\;\frac{y}{\sqrt{x} \cdot -3}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+83}:\\
\;\;\;\;1 + \frac{\frac{-1}{x}}{9}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{-3}}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -8.50000000000000002e55Initial program 99.7%
*-commutative99.7%
metadata-eval99.7%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in y around inf 87.4%
associate-*r*87.4%
*-commutative87.4%
*-commutative87.4%
Simplified87.4%
associate-*r*87.4%
sqrt-div87.5%
metadata-eval87.5%
div-inv87.4%
associate-/r/87.4%
div-inv87.8%
metadata-eval87.8%
Applied egg-rr87.8%
if -8.50000000000000002e55 < y < 1.09999999999999999e83Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
distribute-neg-frac99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 97.3%
*-commutative97.3%
inv-pow97.3%
metadata-eval97.3%
pow-prod-up97.2%
metadata-eval97.2%
swap-sqr97.1%
metadata-eval97.1%
div-inv97.3%
metadata-eval97.3%
div-inv97.1%
frac-times97.2%
pow-prod-up97.4%
metadata-eval97.4%
inv-pow97.4%
metadata-eval97.4%
Applied egg-rr97.4%
if 1.09999999999999999e83 < y Initial program 99.4%
*-commutative99.4%
metadata-eval99.4%
sqrt-prod99.7%
pow1/299.7%
Applied egg-rr99.7%
unpow1/299.7%
Simplified99.7%
Taylor expanded in y around inf 88.6%
associate-*r*88.7%
*-commutative88.7%
*-commutative88.7%
Simplified88.7%
associate-*r*88.6%
sqrt-div88.7%
metadata-eval88.7%
div-inv88.8%
metadata-eval88.8%
div-inv88.9%
associate-/l/88.8%
associate-/r*88.9%
Applied egg-rr88.9%
Final simplification93.7%
(FPCore (x y) :precision binary64 (+ 1.0 (/ -1.0 (* x 9.0))))
double code(double x, double y) {
return 1.0 + (-1.0 / (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))
end function
public static double code(double x, double y) {
return 1.0 + (-1.0 / (x * 9.0));
}
def code(x, y): return 1.0 + (-1.0 / (x * 9.0))
function code(x, y) return Float64(1.0 + Float64(-1.0 / Float64(x * 9.0))) end
function tmp = code(x, y) tmp = 1.0 + (-1.0 / (x * 9.0)); end
code[x_, y_] := N[(1.0 + N[(-1.0 / N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{-1}{x \cdot 9}
\end{array}
Initial program 99.7%
associate--l-99.7%
+-commutative99.7%
associate--r+99.7%
sub-neg99.7%
distribute-frac-neg99.7%
associate-+r-99.7%
neg-mul-199.7%
associate-*l/99.6%
fma-neg99.6%
associate-/r*99.6%
metadata-eval99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 61.6%
div-inv61.7%
clear-num61.7%
div-inv61.7%
metadata-eval61.7%
Applied egg-rr61.7%
Final simplification61.7%
(FPCore (x y) :precision binary64 (+ 1.0 (/ (/ -1.0 x) 9.0)))
double code(double x, double y) {
return 1.0 + ((-1.0 / 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)
end function
public static double code(double x, double y) {
return 1.0 + ((-1.0 / x) / 9.0);
}
def code(x, y): return 1.0 + ((-1.0 / x) / 9.0)
function code(x, y) return Float64(1.0 + Float64(Float64(-1.0 / x) / 9.0)) end
function tmp = code(x, y) tmp = 1.0 + ((-1.0 / x) / 9.0); end
code[x_, y_] := N[(1.0 + N[(N[(-1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{\frac{-1}{x}}{9}
\end{array}
Initial program 99.7%
associate--l-99.7%
+-commutative99.7%
associate--r+99.7%
sub-neg99.7%
distribute-frac-neg99.7%
associate-+r-99.7%
neg-mul-199.7%
associate-*l/99.6%
fma-neg99.6%
associate-/r*99.6%
metadata-eval99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 61.6%
*-commutative61.6%
inv-pow61.6%
metadata-eval61.6%
pow-prod-up61.6%
metadata-eval61.6%
swap-sqr61.5%
metadata-eval61.5%
div-inv61.6%
metadata-eval61.6%
div-inv61.5%
frac-times61.5%
pow-prod-up61.7%
metadata-eval61.7%
inv-pow61.7%
metadata-eval61.7%
Applied egg-rr61.7%
Final simplification61.7%
(FPCore (x y) :precision binary64 (if (<= x 190000.0) (/ -0.1111111111111111 x) 1.0))
double code(double x, double y) {
double tmp;
if (x <= 190000.0) {
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 <= 190000.0d0) 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 <= 190000.0) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 190000.0: tmp = -0.1111111111111111 / x else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 190000.0) tmp = Float64(-0.1111111111111111 / x); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 190000.0) tmp = -0.1111111111111111 / x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 190000.0], N[(-0.1111111111111111 / x), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 190000:\\
\;\;\;\;\frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < 1.9e5Initial program 99.6%
*-commutative99.6%
metadata-eval99.6%
sqrt-prod99.6%
pow1/299.6%
Applied egg-rr99.6%
unpow1/299.6%
Simplified99.6%
Taylor expanded in x around 0 58.2%
if 1.9e5 < x Initial program 99.8%
associate--l-99.8%
+-commutative99.8%
associate--r+99.8%
sub-neg99.8%
distribute-frac-neg99.8%
associate-+r-99.8%
neg-mul-199.8%
associate-*l/99.8%
fma-neg99.8%
associate-/r*99.7%
metadata-eval99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around inf 64.1%
Final simplification61.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.7%
associate--l-99.7%
+-commutative99.7%
associate--r+99.7%
sub-neg99.7%
distribute-frac-neg99.7%
associate-+r-99.7%
neg-mul-199.7%
associate-*l/99.6%
fma-neg99.6%
associate-/r*99.6%
metadata-eval99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 61.6%
cancel-sign-sub-inv61.6%
metadata-eval61.6%
associate-*r/61.7%
metadata-eval61.7%
+-commutative61.7%
Simplified61.7%
Final simplification61.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%
+-commutative99.7%
associate--r+99.7%
sub-neg99.7%
distribute-frac-neg99.7%
associate-+r-99.7%
neg-mul-199.7%
associate-*l/99.6%
fma-neg99.6%
associate-/r*99.6%
metadata-eval99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 33.7%
Final simplification33.7%
(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 2023336
(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)))))