
(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 18 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 (/ 0.1111111111111111 x)) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
Initial program 99.7%
Taylor expanded in x around 0 99.7%
(FPCore (x y)
:precision binary64
(if (<= y -1.65e+36)
(- 1.0 (* y (sqrt (/ 0.1111111111111111 x))))
(if (<= y 3.5e+26)
(+ 1.0 (/ -0.1111111111111111 x))
(- 1.0 (/ (pow x -0.5) (/ 3.0 y))))))
double code(double x, double y) {
double tmp;
if (y <= -1.65e+36) {
tmp = 1.0 - (y * sqrt((0.1111111111111111 / x)));
} else if (y <= 3.5e+26) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = 1.0 - (pow(x, -0.5) / (3.0 / y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.65d+36)) then
tmp = 1.0d0 - (y * sqrt((0.1111111111111111d0 / x)))
else if (y <= 3.5d+26) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = 1.0d0 - ((x ** (-0.5d0)) / (3.0d0 / y))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.65e+36) {
tmp = 1.0 - (y * Math.sqrt((0.1111111111111111 / x)));
} else if (y <= 3.5e+26) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = 1.0 - (Math.pow(x, -0.5) / (3.0 / y));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.65e+36: tmp = 1.0 - (y * math.sqrt((0.1111111111111111 / x))) elif y <= 3.5e+26: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = 1.0 - (math.pow(x, -0.5) / (3.0 / y)) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.65e+36) tmp = Float64(1.0 - Float64(y * sqrt(Float64(0.1111111111111111 / x)))); elseif (y <= 3.5e+26) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(1.0 - Float64((x ^ -0.5) / Float64(3.0 / y))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.65e+36) tmp = 1.0 - (y * sqrt((0.1111111111111111 / x))); elseif (y <= 3.5e+26) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = 1.0 - ((x ^ -0.5) / (3.0 / y)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.65e+36], N[(1.0 - N[(y * N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e+26], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(N[Power[x, -0.5], $MachinePrecision] / N[(3.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.65 \cdot 10^{+36}:\\
\;\;\;\;1 - y \cdot \sqrt{\frac{0.1111111111111111}{x}}\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{+26}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{{x}^{-0.5}}{\frac{3}{y}}\\
\end{array}
\end{array}
if y < -1.6499999999999999e36Initial program 99.5%
Taylor expanded in x around inf 95.1%
metadata-eval95.1%
*-commutative95.1%
sqrt-div95.1%
metadata-eval95.1%
un-div-inv95.0%
times-frac95.2%
*-un-lft-identity95.2%
associate-/r*95.1%
div-inv95.0%
metadata-eval95.0%
Applied egg-rr95.0%
associate-/l*95.1%
div-inv95.2%
metadata-eval95.2%
sqrt-div95.1%
*-commutative95.1%
metadata-eval95.1%
sqrt-prod95.3%
un-div-inv95.3%
Applied egg-rr95.3%
if -1.6499999999999999e36 < y < 3.4999999999999999e26Initial 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.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 98.7%
if 3.4999999999999999e26 < y Initial program 99.6%
Taylor expanded in x around inf 89.4%
metadata-eval89.4%
*-commutative89.4%
sqrt-div89.4%
metadata-eval89.4%
un-div-inv89.4%
times-frac90.8%
*-commutative90.8%
times-frac90.8%
metadata-eval90.8%
sqrt-div90.8%
metadata-eval90.8%
add-sqr-sqrt90.7%
frac-times90.8%
sqrt-unprod0.0%
add-sqr-sqrt7.5%
clear-num7.5%
div-inv7.5%
add-sqr-sqrt0.0%
sqrt-unprod90.8%
frac-times90.7%
metadata-eval90.7%
add-sqr-sqrt90.8%
Applied egg-rr90.8%
Final simplification96.0%
(FPCore (x y) :precision binary64 (if (or (<= y -8.5e+37) (not (<= y 6.2e+25))) (- 1.0 (* y (sqrt (/ 0.1111111111111111 x)))) (+ 1.0 (/ -0.1111111111111111 x))))
double code(double x, double y) {
double tmp;
if ((y <= -8.5e+37) || !(y <= 6.2e+25)) {
tmp = 1.0 - (y * sqrt((0.1111111111111111 / x)));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-8.5d+37)) .or. (.not. (y <= 6.2d+25))) then
tmp = 1.0d0 - (y * sqrt((0.1111111111111111d0 / x)))
else
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -8.5e+37) || !(y <= 6.2e+25)) {
tmp = 1.0 - (y * Math.sqrt((0.1111111111111111 / x)));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -8.5e+37) or not (y <= 6.2e+25): tmp = 1.0 - (y * math.sqrt((0.1111111111111111 / x))) else: tmp = 1.0 + (-0.1111111111111111 / x) return tmp
function code(x, y) tmp = 0.0 if ((y <= -8.5e+37) || !(y <= 6.2e+25)) tmp = Float64(1.0 - Float64(y * sqrt(Float64(0.1111111111111111 / x)))); else tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -8.5e+37) || ~((y <= 6.2e+25))) tmp = 1.0 - (y * sqrt((0.1111111111111111 / x))); else tmp = 1.0 + (-0.1111111111111111 / x); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -8.5e+37], N[Not[LessEqual[y, 6.2e+25]], $MachinePrecision]], N[(1.0 - N[(y * N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+37} \lor \neg \left(y \leq 6.2 \cdot 10^{+25}\right):\\
\;\;\;\;1 - y \cdot \sqrt{\frac{0.1111111111111111}{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\end{array}
\end{array}
if y < -8.4999999999999999e37 or 6.1999999999999996e25 < y Initial program 99.6%
Taylor expanded in x around inf 91.7%
metadata-eval91.7%
*-commutative91.7%
sqrt-div91.7%
metadata-eval91.7%
un-div-inv91.6%
times-frac92.6%
*-un-lft-identity92.6%
associate-/r*92.5%
div-inv92.3%
metadata-eval92.3%
Applied egg-rr92.3%
associate-/l*92.3%
div-inv92.4%
metadata-eval92.4%
sqrt-div92.4%
*-commutative92.4%
metadata-eval92.4%
sqrt-prod92.5%
un-div-inv92.5%
Applied egg-rr92.5%
if -8.4999999999999999e37 < y < 6.1999999999999996e25Initial 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.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 98.7%
Final simplification96.0%
(FPCore (x y) :precision binary64 (if (or (<= y -2.9e+48) (not (<= y 6e+56))) (* y (* -0.3333333333333333 (sqrt (/ 1.0 x)))) (+ 1.0 (/ -0.1111111111111111 x))))
double code(double x, double y) {
double tmp;
if ((y <= -2.9e+48) || !(y <= 6e+56)) {
tmp = y * (-0.3333333333333333 * sqrt((1.0 / x)));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-2.9d+48)) .or. (.not. (y <= 6d+56))) then
tmp = y * ((-0.3333333333333333d0) * sqrt((1.0d0 / x)))
else
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -2.9e+48) || !(y <= 6e+56)) {
tmp = y * (-0.3333333333333333 * Math.sqrt((1.0 / x)));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -2.9e+48) or not (y <= 6e+56): tmp = y * (-0.3333333333333333 * math.sqrt((1.0 / x))) else: tmp = 1.0 + (-0.1111111111111111 / x) return tmp
function code(x, y) tmp = 0.0 if ((y <= -2.9e+48) || !(y <= 6e+56)) tmp = Float64(y * Float64(-0.3333333333333333 * sqrt(Float64(1.0 / x)))); else tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -2.9e+48) || ~((y <= 6e+56))) tmp = y * (-0.3333333333333333 * sqrt((1.0 / x))); else tmp = 1.0 + (-0.1111111111111111 / x); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -2.9e+48], N[Not[LessEqual[y, 6e+56]], $MachinePrecision]], N[(y * N[(-0.3333333333333333 * N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+48} \lor \neg \left(y \leq 6 \cdot 10^{+56}\right):\\
\;\;\;\;y \cdot \left(-0.3333333333333333 \cdot \sqrt{\frac{1}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\end{array}
\end{array}
if y < -2.8999999999999999e48 or 6.00000000000000012e56 < y Initial program 99.6%
Taylor expanded in x around 0 99.6%
Taylor expanded in y around inf 86.2%
*-commutative86.2%
*-commutative86.2%
associate-*r*86.9%
Simplified86.9%
if -2.8999999999999999e48 < y < 6.00000000000000012e56Initial 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.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.9%
Final simplification93.5%
(FPCore (x y)
:precision binary64
(if (<= y -5.3e+35)
(- 1.0 (* y (sqrt (/ 0.1111111111111111 x))))
(if (<= y 3.1e+26)
(+ 1.0 (/ -0.1111111111111111 x))
(- 1.0 (/ y (* 3.0 (sqrt x)))))))
double code(double x, double y) {
double tmp;
if (y <= -5.3e+35) {
tmp = 1.0 - (y * sqrt((0.1111111111111111 / x)));
} else if (y <= 3.1e+26) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = 1.0 - (y / (3.0 * sqrt(x)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-5.3d+35)) then
tmp = 1.0d0 - (y * sqrt((0.1111111111111111d0 / x)))
else if (y <= 3.1d+26) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = 1.0d0 - (y / (3.0d0 * sqrt(x)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -5.3e+35) {
tmp = 1.0 - (y * Math.sqrt((0.1111111111111111 / x)));
} else if (y <= 3.1e+26) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = 1.0 - (y / (3.0 * Math.sqrt(x)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -5.3e+35: tmp = 1.0 - (y * math.sqrt((0.1111111111111111 / x))) elif y <= 3.1e+26: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = 1.0 - (y / (3.0 * math.sqrt(x))) return tmp
function code(x, y) tmp = 0.0 if (y <= -5.3e+35) tmp = Float64(1.0 - Float64(y * sqrt(Float64(0.1111111111111111 / x)))); elseif (y <= 3.1e+26) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(1.0 - Float64(y / Float64(3.0 * sqrt(x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -5.3e+35) tmp = 1.0 - (y * sqrt((0.1111111111111111 / x))); elseif (y <= 3.1e+26) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = 1.0 - (y / (3.0 * sqrt(x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -5.3e+35], N[(1.0 - N[(y * N[Sqrt[N[(0.1111111111111111 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e+26], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.3 \cdot 10^{+35}:\\
\;\;\;\;1 - y \cdot \sqrt{\frac{0.1111111111111111}{x}}\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+26}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{y}{3 \cdot \sqrt{x}}\\
\end{array}
\end{array}
if y < -5.30000000000000009e35Initial program 99.5%
Taylor expanded in x around inf 95.1%
metadata-eval95.1%
*-commutative95.1%
sqrt-div95.1%
metadata-eval95.1%
un-div-inv95.0%
times-frac95.2%
*-un-lft-identity95.2%
associate-/r*95.1%
div-inv95.0%
metadata-eval95.0%
Applied egg-rr95.0%
associate-/l*95.1%
div-inv95.2%
metadata-eval95.2%
sqrt-div95.1%
*-commutative95.1%
metadata-eval95.1%
sqrt-prod95.3%
un-div-inv95.3%
Applied egg-rr95.3%
if -5.30000000000000009e35 < y < 3.1e26Initial 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.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 98.7%
if 3.1e26 < y Initial program 99.6%
Taylor expanded in x around inf 89.4%
metadata-eval89.4%
*-commutative89.4%
sqrt-div89.4%
metadata-eval89.4%
un-div-inv89.4%
times-frac90.8%
*-un-lft-identity90.8%
Applied egg-rr90.8%
*-commutative90.8%
Simplified90.8%
Final simplification96.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (sqrt (/ 1.0 x))))
(if (<= y -2.9e+48)
(* -0.3333333333333333 (* y t_0))
(if (<= y 1.15e+57)
(+ 1.0 (/ -0.1111111111111111 x))
(* y (* -0.3333333333333333 t_0))))))
double code(double x, double y) {
double t_0 = sqrt((1.0 / x));
double tmp;
if (y <= -2.9e+48) {
tmp = -0.3333333333333333 * (y * t_0);
} else if (y <= 1.15e+57) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = y * (-0.3333333333333333 * t_0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt((1.0d0 / x))
if (y <= (-2.9d+48)) then
tmp = (-0.3333333333333333d0) * (y * t_0)
else if (y <= 1.15d+57) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = y * ((-0.3333333333333333d0) * t_0)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = Math.sqrt((1.0 / x));
double tmp;
if (y <= -2.9e+48) {
tmp = -0.3333333333333333 * (y * t_0);
} else if (y <= 1.15e+57) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = y * (-0.3333333333333333 * t_0);
}
return tmp;
}
def code(x, y): t_0 = math.sqrt((1.0 / x)) tmp = 0 if y <= -2.9e+48: tmp = -0.3333333333333333 * (y * t_0) elif y <= 1.15e+57: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = y * (-0.3333333333333333 * t_0) return tmp
function code(x, y) t_0 = sqrt(Float64(1.0 / x)) tmp = 0.0 if (y <= -2.9e+48) tmp = Float64(-0.3333333333333333 * Float64(y * t_0)); elseif (y <= 1.15e+57) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(y * Float64(-0.3333333333333333 * t_0)); end return tmp end
function tmp_2 = code(x, y) t_0 = sqrt((1.0 / x)); tmp = 0.0; if (y <= -2.9e+48) tmp = -0.3333333333333333 * (y * t_0); elseif (y <= 1.15e+57) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = y * (-0.3333333333333333 * t_0); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[Sqrt[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, -2.9e+48], N[(-0.3333333333333333 * N[(y * t$95$0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e+57], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(y * N[(-0.3333333333333333 * t$95$0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \sqrt{\frac{1}{x}}\\
\mathbf{if}\;y \leq -2.9 \cdot 10^{+48}:\\
\;\;\;\;-0.3333333333333333 \cdot \left(y \cdot t\_0\right)\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+57}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-0.3333333333333333 \cdot t\_0\right)\\
\end{array}
\end{array}
if y < -2.8999999999999999e48Initial program 99.5%
Taylor expanded in x around 0 99.5%
Taylor expanded in y around inf 87.6%
*-commutative87.6%
*-commutative87.6%
Simplified87.6%
if -2.8999999999999999e48 < y < 1.1499999999999999e57Initial 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.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 97.9%
if 1.1499999999999999e57 < y Initial program 99.6%
Taylor expanded in x around 0 99.6%
Taylor expanded in y around inf 85.2%
*-commutative85.2%
*-commutative85.2%
associate-*r*86.4%
Simplified86.4%
Final simplification93.5%
(FPCore (x y) :precision binary64 (if (<= x 0.112) (/ (- (* -0.3333333333333333 (* y (sqrt x))) 0.1111111111111111) x) (- 1.0 (/ (pow x -0.5) (/ 3.0 y)))))
double code(double x, double y) {
double tmp;
if (x <= 0.112) {
tmp = ((-0.3333333333333333 * (y * sqrt(x))) - 0.1111111111111111) / x;
} else {
tmp = 1.0 - (pow(x, -0.5) / (3.0 / y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 0.112d0) then
tmp = (((-0.3333333333333333d0) * (y * sqrt(x))) - 0.1111111111111111d0) / x
else
tmp = 1.0d0 - ((x ** (-0.5d0)) / (3.0d0 / y))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.112) {
tmp = ((-0.3333333333333333 * (y * Math.sqrt(x))) - 0.1111111111111111) / x;
} else {
tmp = 1.0 - (Math.pow(x, -0.5) / (3.0 / y));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.112: tmp = ((-0.3333333333333333 * (y * math.sqrt(x))) - 0.1111111111111111) / x else: tmp = 1.0 - (math.pow(x, -0.5) / (3.0 / y)) return tmp
function code(x, y) tmp = 0.0 if (x <= 0.112) tmp = Float64(Float64(Float64(-0.3333333333333333 * Float64(y * sqrt(x))) - 0.1111111111111111) / x); else tmp = Float64(1.0 - Float64((x ^ -0.5) / Float64(3.0 / y))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.112) tmp = ((-0.3333333333333333 * (y * sqrt(x))) - 0.1111111111111111) / x; else tmp = 1.0 - ((x ^ -0.5) / (3.0 / y)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.112], N[(N[(N[(-0.3333333333333333 * N[(y * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.1111111111111111), $MachinePrecision] / x), $MachinePrecision], N[(1.0 - N[(N[Power[x, -0.5], $MachinePrecision] / N[(3.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.112:\\
\;\;\;\;\frac{-0.3333333333333333 \cdot \left(y \cdot \sqrt{x}\right) - 0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{{x}^{-0.5}}{\frac{3}{y}}\\
\end{array}
\end{array}
if x < 0.112000000000000002Initial program 99.5%
sub-neg99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
distribute-frac-neg99.5%
neg-mul-199.5%
times-frac98.8%
metadata-eval98.8%
Simplified98.8%
*-commutative98.8%
associate-*l/99.4%
associate-*r/99.5%
frac-2neg99.5%
associate-*r/99.4%
metadata-eval99.4%
metadata-eval99.4%
div-inv99.5%
distribute-neg-frac299.5%
associate-/r*99.5%
clear-num99.4%
distribute-neg-frac299.4%
*-commutative99.4%
associate-/l*99.5%
Applied egg-rr99.5%
distribute-frac-neg299.5%
distribute-neg-frac99.5%
metadata-eval99.5%
associate-/r*99.5%
Simplified99.5%
Taylor expanded in x around 0 99.0%
if 0.112000000000000002 < x Initial program 99.8%
Taylor expanded in x around inf 99.7%
metadata-eval99.7%
*-commutative99.7%
sqrt-div99.7%
metadata-eval99.7%
un-div-inv99.7%
times-frac99.8%
*-commutative99.8%
times-frac99.8%
metadata-eval99.8%
sqrt-div99.8%
metadata-eval99.8%
add-sqr-sqrt99.8%
frac-times99.8%
sqrt-unprod0.0%
add-sqr-sqrt63.3%
clear-num63.3%
div-inv63.3%
add-sqr-sqrt0.0%
sqrt-unprod99.8%
frac-times99.8%
metadata-eval99.8%
add-sqr-sqrt99.8%
Applied egg-rr99.8%
Final simplification99.4%
(FPCore (x y) :precision binary64 (+ (- 1.0 (/ 0.1111111111111111 x)) (/ (* y -0.3333333333333333) (sqrt x))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + ((y * -0.3333333333333333) / sqrt(x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) + ((y * (-0.3333333333333333d0)) / sqrt(x))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + ((y * -0.3333333333333333) / Math.sqrt(x));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) + ((y * -0.3333333333333333) / math.sqrt(x))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) + Float64(Float64(y * -0.3333333333333333) / sqrt(x))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) + ((y * -0.3333333333333333) / sqrt(x)); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) + \frac{y \cdot -0.3333333333333333}{\sqrt{x}}
\end{array}
Initial program 99.7%
sub-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
times-frac99.3%
metadata-eval99.3%
Simplified99.3%
clear-num99.3%
un-div-inv99.6%
Applied egg-rr99.6%
associate-/r/99.6%
associate-*l/99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y) :precision binary64 (+ (- 1.0 (/ 0.1111111111111111 x)) (* -0.3333333333333333 (/ y (sqrt x)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) + ((-0.3333333333333333d0) * (y / sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / Math.sqrt(x)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}
\end{array}
Initial program 99.7%
sub-neg99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
times-frac99.3%
metadata-eval99.3%
Simplified99.3%
(FPCore (x y)
:precision binary64
(if (<= y -1.08e+133)
(/
(- 1.0 (* (/ -0.1111111111111111 x) (/ -0.1111111111111111 x)))
(- 1.0 (* 0.1111111111111111 (/ 1.0 x))))
(if (<= y 7.6e+174)
(+ 1.0 (/ -0.1111111111111111 x))
(/
(+ 1.0 (/ -1.0 (* (* x -9.0) (* x -9.0))))
(- 1.0 (/ -0.1111111111111111 x))))))
double code(double x, double y) {
double tmp;
if (y <= -1.08e+133) {
tmp = (1.0 - ((-0.1111111111111111 / x) * (-0.1111111111111111 / x))) / (1.0 - (0.1111111111111111 * (1.0 / x)));
} else if (y <= 7.6e+174) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (1.0 + (-1.0 / ((x * -9.0) * (x * -9.0)))) / (1.0 - (-0.1111111111111111 / x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1.08d+133)) then
tmp = (1.0d0 - (((-0.1111111111111111d0) / x) * ((-0.1111111111111111d0) / x))) / (1.0d0 - (0.1111111111111111d0 * (1.0d0 / x)))
else if (y <= 7.6d+174) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = (1.0d0 + ((-1.0d0) / ((x * (-9.0d0)) * (x * (-9.0d0))))) / (1.0d0 - ((-0.1111111111111111d0) / x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1.08e+133) {
tmp = (1.0 - ((-0.1111111111111111 / x) * (-0.1111111111111111 / x))) / (1.0 - (0.1111111111111111 * (1.0 / x)));
} else if (y <= 7.6e+174) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (1.0 + (-1.0 / ((x * -9.0) * (x * -9.0)))) / (1.0 - (-0.1111111111111111 / x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.08e+133: tmp = (1.0 - ((-0.1111111111111111 / x) * (-0.1111111111111111 / x))) / (1.0 - (0.1111111111111111 * (1.0 / x))) elif y <= 7.6e+174: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = (1.0 + (-1.0 / ((x * -9.0) * (x * -9.0)))) / (1.0 - (-0.1111111111111111 / x)) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.08e+133) tmp = Float64(Float64(1.0 - Float64(Float64(-0.1111111111111111 / x) * Float64(-0.1111111111111111 / x))) / Float64(1.0 - Float64(0.1111111111111111 * Float64(1.0 / x)))); elseif (y <= 7.6e+174) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(Float64(1.0 + Float64(-1.0 / Float64(Float64(x * -9.0) * Float64(x * -9.0)))) / Float64(1.0 - Float64(-0.1111111111111111 / x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.08e+133) tmp = (1.0 - ((-0.1111111111111111 / x) * (-0.1111111111111111 / x))) / (1.0 - (0.1111111111111111 * (1.0 / x))); elseif (y <= 7.6e+174) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = (1.0 + (-1.0 / ((x * -9.0) * (x * -9.0)))) / (1.0 - (-0.1111111111111111 / x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.08e+133], N[(N[(1.0 - N[(N[(-0.1111111111111111 / x), $MachinePrecision] * N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - N[(0.1111111111111111 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.6e+174], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 + N[(-1.0 / N[(N[(x * -9.0), $MachinePrecision] * N[(x * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.08 \cdot 10^{+133}:\\
\;\;\;\;\frac{1 - \frac{-0.1111111111111111}{x} \cdot \frac{-0.1111111111111111}{x}}{1 - 0.1111111111111111 \cdot \frac{1}{x}}\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{+174}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \frac{-1}{\left(x \cdot -9\right) \cdot \left(x \cdot -9\right)}}{1 - \frac{-0.1111111111111111}{x}}\\
\end{array}
\end{array}
if y < -1.08e133Initial 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.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 4.3%
sub-neg4.3%
flip-+4.2%
metadata-eval4.2%
distribute-lft-neg-in4.2%
un-div-inv4.2%
metadata-eval4.2%
distribute-lft-neg-in4.2%
un-div-inv4.2%
metadata-eval4.2%
distribute-lft-neg-in4.2%
un-div-inv4.2%
metadata-eval4.2%
Applied egg-rr4.2%
add-sqr-sqrt0.0%
sqrt-unprod5.2%
frac-times5.2%
metadata-eval5.2%
metadata-eval5.2%
frac-times5.2%
sqrt-unprod25.8%
add-sqr-sqrt25.8%
clear-num25.8%
associate-/r/25.8%
Applied egg-rr25.8%
if -1.08e133 < y < 7.6000000000000004e174Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
fma-neg99.7%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 80.5%
if 7.6000000000000004e174 < y Initial program 99.6%
associate--l-99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
distribute-frac-neg99.6%
sub-neg99.6%
neg-mul-199.6%
*-commutative99.6%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 4.5%
sub-neg4.5%
flip-+39.0%
metadata-eval39.0%
distribute-lft-neg-in39.0%
un-div-inv39.0%
metadata-eval39.0%
distribute-lft-neg-in39.0%
un-div-inv39.0%
metadata-eval39.0%
distribute-lft-neg-in39.0%
un-div-inv39.0%
metadata-eval39.0%
Applied egg-rr39.0%
clear-num39.0%
clear-num39.0%
frac-times39.0%
metadata-eval39.0%
div-inv39.0%
metadata-eval39.0%
div-inv39.0%
metadata-eval39.0%
Applied egg-rr39.0%
Final simplification69.2%
(FPCore (x y)
:precision binary64
(if (<= y -5.5e+130)
(/
(- 1.0 (* (/ -0.1111111111111111 x) (/ -0.1111111111111111 x)))
(- 1.0 (* 0.1111111111111111 (/ 1.0 x))))
(if (<= y 7.6e+174)
(+ 1.0 (/ -0.1111111111111111 x))
(/
(- 1.0 (/ -0.1111111111111111 (* x (* x -9.0))))
(- 1.0 (/ -0.1111111111111111 x))))))
double code(double x, double y) {
double tmp;
if (y <= -5.5e+130) {
tmp = (1.0 - ((-0.1111111111111111 / x) * (-0.1111111111111111 / x))) / (1.0 - (0.1111111111111111 * (1.0 / x)));
} else if (y <= 7.6e+174) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (1.0 - (-0.1111111111111111 / (x * (x * -9.0)))) / (1.0 - (-0.1111111111111111 / x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-5.5d+130)) then
tmp = (1.0d0 - (((-0.1111111111111111d0) / x) * ((-0.1111111111111111d0) / x))) / (1.0d0 - (0.1111111111111111d0 * (1.0d0 / x)))
else if (y <= 7.6d+174) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = (1.0d0 - ((-0.1111111111111111d0) / (x * (x * (-9.0d0))))) / (1.0d0 - ((-0.1111111111111111d0) / x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -5.5e+130) {
tmp = (1.0 - ((-0.1111111111111111 / x) * (-0.1111111111111111 / x))) / (1.0 - (0.1111111111111111 * (1.0 / x)));
} else if (y <= 7.6e+174) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (1.0 - (-0.1111111111111111 / (x * (x * -9.0)))) / (1.0 - (-0.1111111111111111 / x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -5.5e+130: tmp = (1.0 - ((-0.1111111111111111 / x) * (-0.1111111111111111 / x))) / (1.0 - (0.1111111111111111 * (1.0 / x))) elif y <= 7.6e+174: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = (1.0 - (-0.1111111111111111 / (x * (x * -9.0)))) / (1.0 - (-0.1111111111111111 / x)) return tmp
function code(x, y) tmp = 0.0 if (y <= -5.5e+130) tmp = Float64(Float64(1.0 - Float64(Float64(-0.1111111111111111 / x) * Float64(-0.1111111111111111 / x))) / Float64(1.0 - Float64(0.1111111111111111 * Float64(1.0 / x)))); elseif (y <= 7.6e+174) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(Float64(1.0 - Float64(-0.1111111111111111 / Float64(x * Float64(x * -9.0)))) / Float64(1.0 - Float64(-0.1111111111111111 / x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -5.5e+130) tmp = (1.0 - ((-0.1111111111111111 / x) * (-0.1111111111111111 / x))) / (1.0 - (0.1111111111111111 * (1.0 / x))); elseif (y <= 7.6e+174) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = (1.0 - (-0.1111111111111111 / (x * (x * -9.0)))) / (1.0 - (-0.1111111111111111 / x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -5.5e+130], N[(N[(1.0 - N[(N[(-0.1111111111111111 / x), $MachinePrecision] * N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - N[(0.1111111111111111 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.6e+174], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(-0.1111111111111111 / N[(x * N[(x * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 - N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+130}:\\
\;\;\;\;\frac{1 - \frac{-0.1111111111111111}{x} \cdot \frac{-0.1111111111111111}{x}}{1 - 0.1111111111111111 \cdot \frac{1}{x}}\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{+174}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - \frac{-0.1111111111111111}{x \cdot \left(x \cdot -9\right)}}{1 - \frac{-0.1111111111111111}{x}}\\
\end{array}
\end{array}
if y < -5.4999999999999997e130Initial 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.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 4.3%
sub-neg4.3%
flip-+4.2%
metadata-eval4.2%
distribute-lft-neg-in4.2%
un-div-inv4.2%
metadata-eval4.2%
distribute-lft-neg-in4.2%
un-div-inv4.2%
metadata-eval4.2%
distribute-lft-neg-in4.2%
un-div-inv4.2%
metadata-eval4.2%
Applied egg-rr4.2%
add-sqr-sqrt0.0%
sqrt-unprod5.2%
frac-times5.2%
metadata-eval5.2%
metadata-eval5.2%
frac-times5.2%
sqrt-unprod25.8%
add-sqr-sqrt25.8%
clear-num25.8%
associate-/r/25.8%
Applied egg-rr25.8%
if -5.4999999999999997e130 < y < 7.6000000000000004e174Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
fma-neg99.7%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 80.5%
if 7.6000000000000004e174 < y Initial program 99.6%
associate--l-99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
distribute-frac-neg99.6%
sub-neg99.6%
neg-mul-199.6%
*-commutative99.6%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 4.5%
sub-neg4.5%
flip-+39.0%
metadata-eval39.0%
distribute-lft-neg-in39.0%
un-div-inv39.0%
metadata-eval39.0%
distribute-lft-neg-in39.0%
un-div-inv39.0%
metadata-eval39.0%
distribute-lft-neg-in39.0%
un-div-inv39.0%
metadata-eval39.0%
Applied egg-rr39.0%
clear-num39.0%
frac-times39.0%
metadata-eval39.0%
div-inv39.0%
metadata-eval39.0%
Applied egg-rr39.0%
Final simplification69.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (- 1.0 (/ -0.1111111111111111 x))))
(if (<= y -2.4e+133)
(/ (+ 1.0 (/ (/ 0.012345679012345678 x) x)) t_0)
(if (<= y 7.6e+174)
(+ 1.0 (/ -0.1111111111111111 x))
(/ (- 1.0 (/ -0.1111111111111111 (* x (* x -9.0)))) t_0)))))
double code(double x, double y) {
double t_0 = 1.0 - (-0.1111111111111111 / x);
double tmp;
if (y <= -2.4e+133) {
tmp = (1.0 + ((0.012345679012345678 / x) / x)) / t_0;
} else if (y <= 7.6e+174) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (1.0 - (-0.1111111111111111 / (x * (x * -9.0)))) / t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = 1.0d0 - ((-0.1111111111111111d0) / x)
if (y <= (-2.4d+133)) then
tmp = (1.0d0 + ((0.012345679012345678d0 / x) / x)) / t_0
else if (y <= 7.6d+174) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = (1.0d0 - ((-0.1111111111111111d0) / (x * (x * (-9.0d0))))) / t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 - (-0.1111111111111111 / x);
double tmp;
if (y <= -2.4e+133) {
tmp = (1.0 + ((0.012345679012345678 / x) / x)) / t_0;
} else if (y <= 7.6e+174) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (1.0 - (-0.1111111111111111 / (x * (x * -9.0)))) / t_0;
}
return tmp;
}
def code(x, y): t_0 = 1.0 - (-0.1111111111111111 / x) tmp = 0 if y <= -2.4e+133: tmp = (1.0 + ((0.012345679012345678 / x) / x)) / t_0 elif y <= 7.6e+174: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = (1.0 - (-0.1111111111111111 / (x * (x * -9.0)))) / t_0 return tmp
function code(x, y) t_0 = Float64(1.0 - Float64(-0.1111111111111111 / x)) tmp = 0.0 if (y <= -2.4e+133) tmp = Float64(Float64(1.0 + Float64(Float64(0.012345679012345678 / x) / x)) / t_0); elseif (y <= 7.6e+174) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(Float64(1.0 - Float64(-0.1111111111111111 / Float64(x * Float64(x * -9.0)))) / t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 - (-0.1111111111111111 / x); tmp = 0.0; if (y <= -2.4e+133) tmp = (1.0 + ((0.012345679012345678 / x) / x)) / t_0; elseif (y <= 7.6e+174) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = (1.0 - (-0.1111111111111111 / (x * (x * -9.0)))) / t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 - N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e+133], N[(N[(1.0 + N[(N[(0.012345679012345678 / x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[y, 7.6e+174], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(-0.1111111111111111 / N[(x * N[(x * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 - \frac{-0.1111111111111111}{x}\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+133}:\\
\;\;\;\;\frac{1 + \frac{\frac{0.012345679012345678}{x}}{x}}{t\_0}\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{+174}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - \frac{-0.1111111111111111}{x \cdot \left(x \cdot -9\right)}}{t\_0}\\
\end{array}
\end{array}
if y < -2.3999999999999999e133Initial 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.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 4.3%
sub-neg4.3%
flip-+4.2%
metadata-eval4.2%
distribute-lft-neg-in4.2%
un-div-inv4.2%
metadata-eval4.2%
distribute-lft-neg-in4.2%
un-div-inv4.2%
metadata-eval4.2%
distribute-lft-neg-in4.2%
un-div-inv4.2%
metadata-eval4.2%
Applied egg-rr4.2%
pow14.2%
metadata-eval4.2%
sqrt-pow125.8%
pow225.8%
frac-times25.8%
sqrt-div25.8%
metadata-eval25.8%
metadata-eval25.8%
sqrt-unprod25.8%
associate-/l/25.8%
associate-/l/25.8%
metadata-eval25.8%
add-sqr-sqrt25.8%
distribute-neg-frac25.8%
distribute-lft-neg-in25.8%
associate-*l/25.8%
distribute-neg-frac225.8%
associate-*r/25.8%
metadata-eval25.8%
Applied egg-rr25.8%
if -2.3999999999999999e133 < y < 7.6000000000000004e174Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
fma-neg99.7%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 80.5%
if 7.6000000000000004e174 < y Initial program 99.6%
associate--l-99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
distribute-frac-neg99.6%
sub-neg99.6%
neg-mul-199.6%
*-commutative99.6%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 4.5%
sub-neg4.5%
flip-+39.0%
metadata-eval39.0%
distribute-lft-neg-in39.0%
un-div-inv39.0%
metadata-eval39.0%
distribute-lft-neg-in39.0%
un-div-inv39.0%
metadata-eval39.0%
distribute-lft-neg-in39.0%
un-div-inv39.0%
metadata-eval39.0%
Applied egg-rr39.0%
clear-num39.0%
frac-times39.0%
metadata-eval39.0%
div-inv39.0%
metadata-eval39.0%
Applied egg-rr39.0%
Final simplification69.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (- 1.0 (/ -0.1111111111111111 x))))
(if (<= y -4.8e+130)
(/ (+ 1.0 (/ (/ 0.012345679012345678 x) x)) t_0)
(if (<= y 7.6e+174)
(+ 1.0 (/ -0.1111111111111111 x))
(/
(- 1.0 (* (/ -0.1111111111111111 x) (/ -0.1111111111111111 x)))
t_0)))))
double code(double x, double y) {
double t_0 = 1.0 - (-0.1111111111111111 / x);
double tmp;
if (y <= -4.8e+130) {
tmp = (1.0 + ((0.012345679012345678 / x) / x)) / t_0;
} else if (y <= 7.6e+174) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (1.0 - ((-0.1111111111111111 / x) * (-0.1111111111111111 / x))) / t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = 1.0d0 - ((-0.1111111111111111d0) / x)
if (y <= (-4.8d+130)) then
tmp = (1.0d0 + ((0.012345679012345678d0 / x) / x)) / t_0
else if (y <= 7.6d+174) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = (1.0d0 - (((-0.1111111111111111d0) / x) * ((-0.1111111111111111d0) / x))) / t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = 1.0 - (-0.1111111111111111 / x);
double tmp;
if (y <= -4.8e+130) {
tmp = (1.0 + ((0.012345679012345678 / x) / x)) / t_0;
} else if (y <= 7.6e+174) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (1.0 - ((-0.1111111111111111 / x) * (-0.1111111111111111 / x))) / t_0;
}
return tmp;
}
def code(x, y): t_0 = 1.0 - (-0.1111111111111111 / x) tmp = 0 if y <= -4.8e+130: tmp = (1.0 + ((0.012345679012345678 / x) / x)) / t_0 elif y <= 7.6e+174: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = (1.0 - ((-0.1111111111111111 / x) * (-0.1111111111111111 / x))) / t_0 return tmp
function code(x, y) t_0 = Float64(1.0 - Float64(-0.1111111111111111 / x)) tmp = 0.0 if (y <= -4.8e+130) tmp = Float64(Float64(1.0 + Float64(Float64(0.012345679012345678 / x) / x)) / t_0); elseif (y <= 7.6e+174) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(Float64(1.0 - Float64(Float64(-0.1111111111111111 / x) * Float64(-0.1111111111111111 / x))) / t_0); end return tmp end
function tmp_2 = code(x, y) t_0 = 1.0 - (-0.1111111111111111 / x); tmp = 0.0; if (y <= -4.8e+130) tmp = (1.0 + ((0.012345679012345678 / x) / x)) / t_0; elseif (y <= 7.6e+174) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = (1.0 - ((-0.1111111111111111 / x) * (-0.1111111111111111 / x))) / t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(1.0 - N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.8e+130], N[(N[(1.0 + N[(N[(0.012345679012345678 / x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[y, 7.6e+174], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(N[(-0.1111111111111111 / x), $MachinePrecision] * N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 - \frac{-0.1111111111111111}{x}\\
\mathbf{if}\;y \leq -4.8 \cdot 10^{+130}:\\
\;\;\;\;\frac{1 + \frac{\frac{0.012345679012345678}{x}}{x}}{t\_0}\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{+174}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - \frac{-0.1111111111111111}{x} \cdot \frac{-0.1111111111111111}{x}}{t\_0}\\
\end{array}
\end{array}
if y < -4.80000000000000048e130Initial 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.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 4.3%
sub-neg4.3%
flip-+4.2%
metadata-eval4.2%
distribute-lft-neg-in4.2%
un-div-inv4.2%
metadata-eval4.2%
distribute-lft-neg-in4.2%
un-div-inv4.2%
metadata-eval4.2%
distribute-lft-neg-in4.2%
un-div-inv4.2%
metadata-eval4.2%
Applied egg-rr4.2%
pow14.2%
metadata-eval4.2%
sqrt-pow125.8%
pow225.8%
frac-times25.8%
sqrt-div25.8%
metadata-eval25.8%
metadata-eval25.8%
sqrt-unprod25.8%
associate-/l/25.8%
associate-/l/25.8%
metadata-eval25.8%
add-sqr-sqrt25.8%
distribute-neg-frac25.8%
distribute-lft-neg-in25.8%
associate-*l/25.8%
distribute-neg-frac225.8%
associate-*r/25.8%
metadata-eval25.8%
Applied egg-rr25.8%
if -4.80000000000000048e130 < y < 7.6000000000000004e174Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
fma-neg99.7%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 80.5%
if 7.6000000000000004e174 < y Initial program 99.6%
associate--l-99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
distribute-frac-neg99.6%
sub-neg99.6%
neg-mul-199.6%
*-commutative99.6%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 4.5%
sub-neg4.5%
flip-+39.0%
metadata-eval39.0%
distribute-lft-neg-in39.0%
un-div-inv39.0%
metadata-eval39.0%
distribute-lft-neg-in39.0%
un-div-inv39.0%
metadata-eval39.0%
distribute-lft-neg-in39.0%
un-div-inv39.0%
metadata-eval39.0%
Applied egg-rr39.0%
Final simplification69.2%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (/ 0.012345679012345678 x) x))
(t_1 (- 1.0 (/ -0.1111111111111111 x))))
(if (<= y -5.8e+132)
(/ (+ 1.0 t_0) t_1)
(if (<= y 7.6e+174)
(+ 1.0 (/ -0.1111111111111111 x))
(/ (- 1.0 t_0) t_1)))))
double code(double x, double y) {
double t_0 = (0.012345679012345678 / x) / x;
double t_1 = 1.0 - (-0.1111111111111111 / x);
double tmp;
if (y <= -5.8e+132) {
tmp = (1.0 + t_0) / t_1;
} else if (y <= 7.6e+174) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (1.0 - t_0) / t_1;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (0.012345679012345678d0 / x) / x
t_1 = 1.0d0 - ((-0.1111111111111111d0) / x)
if (y <= (-5.8d+132)) then
tmp = (1.0d0 + t_0) / t_1
else if (y <= 7.6d+174) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = (1.0d0 - t_0) / t_1
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = (0.012345679012345678 / x) / x;
double t_1 = 1.0 - (-0.1111111111111111 / x);
double tmp;
if (y <= -5.8e+132) {
tmp = (1.0 + t_0) / t_1;
} else if (y <= 7.6e+174) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (1.0 - t_0) / t_1;
}
return tmp;
}
def code(x, y): t_0 = (0.012345679012345678 / x) / x t_1 = 1.0 - (-0.1111111111111111 / x) tmp = 0 if y <= -5.8e+132: tmp = (1.0 + t_0) / t_1 elif y <= 7.6e+174: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = (1.0 - t_0) / t_1 return tmp
function code(x, y) t_0 = Float64(Float64(0.012345679012345678 / x) / x) t_1 = Float64(1.0 - Float64(-0.1111111111111111 / x)) tmp = 0.0 if (y <= -5.8e+132) tmp = Float64(Float64(1.0 + t_0) / t_1); elseif (y <= 7.6e+174) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(Float64(1.0 - t_0) / t_1); end return tmp end
function tmp_2 = code(x, y) t_0 = (0.012345679012345678 / x) / x; t_1 = 1.0 - (-0.1111111111111111 / x); tmp = 0.0; if (y <= -5.8e+132) tmp = (1.0 + t_0) / t_1; elseif (y <= 7.6e+174) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = (1.0 - t_0) / t_1; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(N[(0.012345679012345678 / x), $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$1 = N[(1.0 - N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.8e+132], N[(N[(1.0 + t$95$0), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 7.6e+174], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - t$95$0), $MachinePrecision] / t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{0.012345679012345678}{x}}{x}\\
t_1 := 1 - \frac{-0.1111111111111111}{x}\\
\mathbf{if}\;y \leq -5.8 \cdot 10^{+132}:\\
\;\;\;\;\frac{1 + t\_0}{t\_1}\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{+174}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - t\_0}{t\_1}\\
\end{array}
\end{array}
if y < -5.7999999999999997e132Initial 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.5%
metadata-eval99.5%
*-commutative99.5%
associate-/r*99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 4.3%
sub-neg4.3%
flip-+4.2%
metadata-eval4.2%
distribute-lft-neg-in4.2%
un-div-inv4.2%
metadata-eval4.2%
distribute-lft-neg-in4.2%
un-div-inv4.2%
metadata-eval4.2%
distribute-lft-neg-in4.2%
un-div-inv4.2%
metadata-eval4.2%
Applied egg-rr4.2%
pow14.2%
metadata-eval4.2%
sqrt-pow125.8%
pow225.8%
frac-times25.8%
sqrt-div25.8%
metadata-eval25.8%
metadata-eval25.8%
sqrt-unprod25.8%
associate-/l/25.8%
associate-/l/25.8%
metadata-eval25.8%
add-sqr-sqrt25.8%
distribute-neg-frac25.8%
distribute-lft-neg-in25.8%
associate-*l/25.8%
distribute-neg-frac225.8%
associate-*r/25.8%
metadata-eval25.8%
Applied egg-rr25.8%
if -5.7999999999999997e132 < y < 7.6000000000000004e174Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
fma-neg99.7%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 80.5%
if 7.6000000000000004e174 < y Initial program 99.6%
associate--l-99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
distribute-frac-neg99.6%
sub-neg99.6%
neg-mul-199.6%
*-commutative99.6%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 4.5%
sub-neg4.5%
flip-+39.0%
metadata-eval39.0%
distribute-lft-neg-in39.0%
un-div-inv39.0%
metadata-eval39.0%
distribute-lft-neg-in39.0%
un-div-inv39.0%
metadata-eval39.0%
distribute-lft-neg-in39.0%
un-div-inv39.0%
metadata-eval39.0%
Applied egg-rr39.0%
frac-times39.0%
associate-/r*39.0%
metadata-eval39.0%
Applied egg-rr39.0%
Final simplification69.2%
(FPCore (x y)
:precision binary64
(if (<= y 7.6e+174)
(+ 1.0 (/ -0.1111111111111111 x))
(/
(- 1.0 (/ (/ 0.012345679012345678 x) x))
(- 1.0 (/ -0.1111111111111111 x)))))
double code(double x, double y) {
double tmp;
if (y <= 7.6e+174) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (1.0 - ((0.012345679012345678 / x) / x)) / (1.0 - (-0.1111111111111111 / x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 7.6d+174) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = (1.0d0 - ((0.012345679012345678d0 / x) / x)) / (1.0d0 - ((-0.1111111111111111d0) / x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 7.6e+174) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (1.0 - ((0.012345679012345678 / x) / x)) / (1.0 - (-0.1111111111111111 / x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 7.6e+174: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = (1.0 - ((0.012345679012345678 / x) / x)) / (1.0 - (-0.1111111111111111 / x)) return tmp
function code(x, y) tmp = 0.0 if (y <= 7.6e+174) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(Float64(1.0 - Float64(Float64(0.012345679012345678 / x) / x)) / Float64(1.0 - Float64(-0.1111111111111111 / x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 7.6e+174) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = (1.0 - ((0.012345679012345678 / x) / x)) / (1.0 - (-0.1111111111111111 / x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 7.6e+174], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 - N[(N[(0.012345679012345678 / x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / N[(1.0 - N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 7.6 \cdot 10^{+174}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 - \frac{\frac{0.012345679012345678}{x}}{x}}{1 - \frac{-0.1111111111111111}{x}}\\
\end{array}
\end{array}
if y < 7.6000000000000004e174Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
fma-neg99.7%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 70.4%
if 7.6000000000000004e174 < y Initial program 99.6%
associate--l-99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
distribute-frac-neg99.6%
sub-neg99.6%
neg-mul-199.6%
*-commutative99.6%
associate-/l*99.7%
fma-neg99.7%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 4.5%
sub-neg4.5%
flip-+39.0%
metadata-eval39.0%
distribute-lft-neg-in39.0%
un-div-inv39.0%
metadata-eval39.0%
distribute-lft-neg-in39.0%
un-div-inv39.0%
metadata-eval39.0%
distribute-lft-neg-in39.0%
un-div-inv39.0%
metadata-eval39.0%
Applied egg-rr39.0%
frac-times39.0%
associate-/r*39.0%
metadata-eval39.0%
Applied egg-rr39.0%
(FPCore (x y) :precision binary64 (if (<= x 48000.0) (/ -0.1111111111111111 x) 1.0))
double code(double x, double y) {
double tmp;
if (x <= 48000.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 <= 48000.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 <= 48000.0) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 48000.0: tmp = -0.1111111111111111 / x else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 48000.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 <= 48000.0) tmp = -0.1111111111111111 / x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 48000.0], N[(-0.1111111111111111 / x), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 48000:\\
\;\;\;\;\frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < 48000Initial program 99.5%
associate--l-99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
distribute-frac-neg99.5%
sub-neg99.5%
neg-mul-199.5%
*-commutative99.5%
associate-/l*99.5%
fma-neg99.5%
associate-/r*99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 60.6%
Taylor expanded in x around 0 60.2%
if 48000 < x Initial program 99.8%
Taylor expanded in x around inf 99.7%
Taylor expanded in y around 0 64.7%
(FPCore (x y) :precision binary64 (+ 1.0 (/ -0.1111111111111111 x)))
double code(double x, double y) {
return 1.0 + (-0.1111111111111111 / x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + ((-0.1111111111111111d0) / x)
end function
public static double code(double x, double y) {
return 1.0 + (-0.1111111111111111 / x);
}
def code(x, y): return 1.0 + (-0.1111111111111111 / x)
function code(x, y) return Float64(1.0 + Float64(-0.1111111111111111 / x)) end
function tmp = code(x, y) tmp = 1.0 + (-0.1111111111111111 / x); end
code[x_, y_] := N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \frac{-0.1111111111111111}{x}
\end{array}
Initial program 99.7%
associate--l-99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
distribute-frac-neg99.7%
sub-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
fma-neg99.7%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 62.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%
Taylor expanded in x around inf 69.1%
Taylor expanded in y around 0 33.0%
(FPCore (x y) :precision binary64 (- (- 1.0 (/ (/ 1.0 x) 9.0)) (/ y (* 3.0 (sqrt x)))))
double code(double x, double y) {
return (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - ((1.0d0 / x) / 9.0d0)) - (y / (3.0d0 * sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * Math.sqrt(x)));
}
def code(x, y): return (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(Float64(1.0 / x) / 9.0)) - Float64(y / Float64(3.0 * sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - ((1.0 / x) / 9.0)) - (y / (3.0 * sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(N[(1.0 / x), $MachinePrecision] / 9.0), $MachinePrecision]), $MachinePrecision] - N[(y / N[(3.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{\frac{1}{x}}{9}\right) - \frac{y}{3 \cdot \sqrt{x}}
\end{array}
herbie shell --seed 2024103
(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)))))