
(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 14 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 (* 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}
Initial program 99.7%
Final simplification99.7%
(FPCore (x y) :precision binary64 (if (or (<= y -2.45e+38) (not (<= y 1.12e+36))) (+ 1.0 (* y (/ -0.3333333333333333 (sqrt x)))) (+ 1.0 (/ -0.1111111111111111 x))))
double code(double x, double y) {
double tmp;
if ((y <= -2.45e+38) || !(y <= 1.12e+36)) {
tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x)));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-2.45d+38)) .or. (.not. (y <= 1.12d+36))) then
tmp = 1.0d0 + (y * ((-0.3333333333333333d0) / sqrt(x)))
else
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -2.45e+38) || !(y <= 1.12e+36)) {
tmp = 1.0 + (y * (-0.3333333333333333 / Math.sqrt(x)));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -2.45e+38) or not (y <= 1.12e+36): tmp = 1.0 + (y * (-0.3333333333333333 / math.sqrt(x))) else: tmp = 1.0 + (-0.1111111111111111 / x) return tmp
function code(x, y) tmp = 0.0 if ((y <= -2.45e+38) || !(y <= 1.12e+36)) tmp = Float64(1.0 + Float64(y * Float64(-0.3333333333333333 / sqrt(x)))); else tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -2.45e+38) || ~((y <= 1.12e+36))) tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x))); else tmp = 1.0 + (-0.1111111111111111 / x); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -2.45e+38], N[Not[LessEqual[y, 1.12e+36]], $MachinePrecision]], N[(1.0 + N[(y * N[(-0.3333333333333333 / N[Sqrt[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.45 \cdot 10^{+38} \lor \neg \left(y \leq 1.12 \cdot 10^{+36}\right):\\
\;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\end{array}
\end{array}
if y < -2.45000000000000001e38 or 1.11999999999999999e36 < y Initial program 99.5%
sub-neg99.5%
distribute-frac-neg99.5%
+-commutative99.5%
associate-+r-99.5%
+-commutative99.5%
associate-+r-99.5%
neg-mul-199.5%
*-commutative99.5%
associate-*r/99.4%
fma-neg99.4%
associate-/r*99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 89.3%
associate-*r*89.3%
Simplified89.3%
sqrt-div89.2%
metadata-eval89.2%
div-inv89.3%
expm1-log1p-u46.2%
expm1-udef8.4%
Applied egg-rr8.4%
expm1-def46.2%
expm1-log1p89.3%
Simplified89.3%
if -2.45000000000000001e38 < y < 1.11999999999999999e36Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate-+r-99.8%
neg-mul-199.8%
*-commutative99.8%
associate-*r/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 99.3%
Final simplification94.9%
(FPCore (x y) :precision binary64 (if (or (<= y -8.2e+36) (not (<= y 9.2e+35))) (+ 1.0 (/ (/ y -3.0) (sqrt x))) (+ 1.0 (/ -0.1111111111111111 x))))
double code(double x, double y) {
double tmp;
if ((y <= -8.2e+36) || !(y <= 9.2e+35)) {
tmp = 1.0 + ((y / -3.0) / sqrt(x));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if ((y <= (-8.2d+36)) .or. (.not. (y <= 9.2d+35))) then
tmp = 1.0d0 + ((y / (-3.0d0)) / sqrt(x))
else
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if ((y <= -8.2e+36) || !(y <= 9.2e+35)) {
tmp = 1.0 + ((y / -3.0) / Math.sqrt(x));
} else {
tmp = 1.0 + (-0.1111111111111111 / x);
}
return tmp;
}
def code(x, y): tmp = 0 if (y <= -8.2e+36) or not (y <= 9.2e+35): tmp = 1.0 + ((y / -3.0) / math.sqrt(x)) else: tmp = 1.0 + (-0.1111111111111111 / x) return tmp
function code(x, y) tmp = 0.0 if ((y <= -8.2e+36) || !(y <= 9.2e+35)) tmp = Float64(1.0 + Float64(Float64(y / -3.0) / sqrt(x))); else tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if ((y <= -8.2e+36) || ~((y <= 9.2e+35))) tmp = 1.0 + ((y / -3.0) / sqrt(x)); else tmp = 1.0 + (-0.1111111111111111 / x); end tmp_2 = tmp; end
code[x_, y_] := If[Or[LessEqual[y, -8.2e+36], N[Not[LessEqual[y, 9.2e+35]], $MachinePrecision]], N[(1.0 + N[(N[(y / -3.0), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{+36} \lor \neg \left(y \leq 9.2 \cdot 10^{+35}\right):\\
\;\;\;\;1 + \frac{\frac{y}{-3}}{\sqrt{x}}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\end{array}
\end{array}
if y < -8.20000000000000026e36 or 9.1999999999999993e35 < y Initial program 99.5%
sub-neg99.5%
distribute-frac-neg99.5%
+-commutative99.5%
associate-+r-99.5%
+-commutative99.5%
associate-+r-99.5%
neg-mul-199.5%
*-commutative99.5%
associate-*r/99.4%
fma-neg99.4%
associate-/r*99.4%
metadata-eval99.4%
*-commutative99.4%
associate-/r*99.4%
distribute-neg-frac99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around inf 89.3%
associate-*r*89.3%
Simplified89.3%
sqrt-div89.2%
metadata-eval89.2%
div-inv89.3%
expm1-log1p-u46.2%
expm1-udef8.4%
Applied egg-rr8.4%
expm1-def46.2%
expm1-log1p89.3%
Simplified89.3%
associate-*l/89.4%
*-un-lft-identity89.4%
times-frac89.4%
metadata-eval89.4%
metadata-eval89.4%
times-frac89.4%
*-un-lft-identity89.4%
associate-/r*89.4%
Applied egg-rr89.4%
if -8.20000000000000026e36 < y < 9.1999999999999993e35Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate-+r-99.8%
neg-mul-199.8%
*-commutative99.8%
associate-*r/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 99.3%
Final simplification94.9%
(FPCore (x y)
:precision binary64
(if (<= y -2.2e+38)
(+ 1.0 (/ -0.3333333333333333 (/ (sqrt x) y)))
(if (<= y 1.2e+36)
(+ 1.0 (/ -0.1111111111111111 x))
(+ 1.0 (* y (/ -0.3333333333333333 (sqrt x)))))))
double code(double x, double y) {
double tmp;
if (y <= -2.2e+38) {
tmp = 1.0 + (-0.3333333333333333 / (sqrt(x) / y));
} else if (y <= 1.2e+36) {
tmp = 1.0 + (-0.1111111111111111 / x);
} 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 <= (-2.2d+38)) then
tmp = 1.0d0 + ((-0.3333333333333333d0) / (sqrt(x) / y))
else if (y <= 1.2d+36) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
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 <= -2.2e+38) {
tmp = 1.0 + (-0.3333333333333333 / (Math.sqrt(x) / y));
} else if (y <= 1.2e+36) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = 1.0 + (y * (-0.3333333333333333 / Math.sqrt(x)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -2.2e+38: tmp = 1.0 + (-0.3333333333333333 / (math.sqrt(x) / y)) elif y <= 1.2e+36: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = 1.0 + (y * (-0.3333333333333333 / math.sqrt(x))) return tmp
function code(x, y) tmp = 0.0 if (y <= -2.2e+38) tmp = Float64(1.0 + Float64(-0.3333333333333333 / Float64(sqrt(x) / y))); elseif (y <= 1.2e+36) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(1.0 + Float64(y * Float64(-0.3333333333333333 / sqrt(x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -2.2e+38) tmp = 1.0 + (-0.3333333333333333 / (sqrt(x) / y)); elseif (y <= 1.2e+36) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -2.2e+38], N[(1.0 + N[(-0.3333333333333333 / N[(N[Sqrt[x], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e+36], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+38}:\\
\;\;\;\;1 + \frac{-0.3333333333333333}{\frac{\sqrt{x}}{y}}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+36}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -2.20000000000000006e38Initial program 99.4%
sub-neg99.4%
distribute-frac-neg99.4%
+-commutative99.4%
associate-+r-99.4%
+-commutative99.4%
associate-+r-99.4%
neg-mul-199.4%
*-commutative99.4%
associate-*r/99.3%
fma-neg99.3%
associate-/r*99.2%
metadata-eval99.2%
*-commutative99.2%
associate-/r*99.2%
distribute-neg-frac99.2%
metadata-eval99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in y around inf 86.4%
associate-*r*86.4%
Simplified86.4%
sqrt-div86.3%
metadata-eval86.3%
div-inv86.3%
expm1-log1p-u53.8%
expm1-udef10.6%
Applied egg-rr10.6%
expm1-def53.8%
expm1-log1p86.3%
Simplified86.3%
associate-*l/86.4%
associate-/l*86.4%
Applied egg-rr86.4%
if -2.20000000000000006e38 < y < 1.19999999999999996e36Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate-+r-99.8%
neg-mul-199.8%
*-commutative99.8%
associate-*r/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 99.3%
if 1.19999999999999996e36 < y Initial program 99.5%
sub-neg99.5%
distribute-frac-neg99.5%
+-commutative99.5%
associate-+r-99.5%
+-commutative99.5%
associate-+r-99.5%
neg-mul-199.5%
*-commutative99.5%
associate-*r/99.5%
fma-neg99.5%
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 inf 92.5%
associate-*r*92.4%
Simplified92.4%
sqrt-div92.4%
metadata-eval92.4%
div-inv92.6%
expm1-log1p-u38.0%
expm1-udef6.0%
Applied egg-rr6.0%
expm1-def38.0%
expm1-log1p92.6%
Simplified92.6%
Final simplification94.9%
(FPCore (x y)
:precision binary64
(if (<= y -1.85e+38)
(+ 1.0 (/ (* y -0.3333333333333333) (sqrt x)))
(if (<= y 5.3e+35)
(+ 1.0 (/ -0.1111111111111111 x))
(+ 1.0 (* y (/ -0.3333333333333333 (sqrt x)))))))
double code(double x, double y) {
double tmp;
if (y <= -1.85e+38) {
tmp = 1.0 + ((y * -0.3333333333333333) / sqrt(x));
} else if (y <= 5.3e+35) {
tmp = 1.0 + (-0.1111111111111111 / x);
} 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 <= (-1.85d+38)) then
tmp = 1.0d0 + ((y * (-0.3333333333333333d0)) / sqrt(x))
else if (y <= 5.3d+35) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
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 <= -1.85e+38) {
tmp = 1.0 + ((y * -0.3333333333333333) / Math.sqrt(x));
} else if (y <= 5.3e+35) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = 1.0 + (y * (-0.3333333333333333 / Math.sqrt(x)));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1.85e+38: tmp = 1.0 + ((y * -0.3333333333333333) / math.sqrt(x)) elif y <= 5.3e+35: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = 1.0 + (y * (-0.3333333333333333 / math.sqrt(x))) return tmp
function code(x, y) tmp = 0.0 if (y <= -1.85e+38) tmp = Float64(1.0 + Float64(Float64(y * -0.3333333333333333) / sqrt(x))); elseif (y <= 5.3e+35) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(1.0 + Float64(y * Float64(-0.3333333333333333 / sqrt(x)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1.85e+38) tmp = 1.0 + ((y * -0.3333333333333333) / sqrt(x)); elseif (y <= 5.3e+35) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = 1.0 + (y * (-0.3333333333333333 / sqrt(x))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1.85e+38], N[(1.0 + N[(N[(y * -0.3333333333333333), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.3e+35], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(y * N[(-0.3333333333333333 / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+38}:\\
\;\;\;\;1 + \frac{y \cdot -0.3333333333333333}{\sqrt{x}}\\
\mathbf{elif}\;y \leq 5.3 \cdot 10^{+35}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 + y \cdot \frac{-0.3333333333333333}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -1.8500000000000001e38Initial program 99.4%
sub-neg99.4%
distribute-frac-neg99.4%
+-commutative99.4%
associate-+r-99.4%
+-commutative99.4%
associate-+r-99.4%
neg-mul-199.4%
*-commutative99.4%
associate-*r/99.3%
fma-neg99.3%
associate-/r*99.2%
metadata-eval99.2%
*-commutative99.2%
associate-/r*99.2%
distribute-neg-frac99.2%
metadata-eval99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in y around inf 86.4%
associate-*r*86.4%
Simplified86.4%
sqrt-div86.3%
metadata-eval86.3%
div-inv86.3%
expm1-log1p-u53.8%
expm1-udef10.6%
Applied egg-rr10.6%
expm1-def53.8%
expm1-log1p86.3%
Simplified86.3%
associate-*l/86.4%
Applied egg-rr86.4%
if -1.8500000000000001e38 < y < 5.30000000000000009e35Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate-+r-99.8%
neg-mul-199.8%
*-commutative99.8%
associate-*r/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 99.3%
if 5.30000000000000009e35 < y Initial program 99.5%
sub-neg99.5%
distribute-frac-neg99.5%
+-commutative99.5%
associate-+r-99.5%
+-commutative99.5%
associate-+r-99.5%
neg-mul-199.5%
*-commutative99.5%
associate-*r/99.5%
fma-neg99.5%
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 inf 92.5%
associate-*r*92.4%
Simplified92.4%
sqrt-div92.4%
metadata-eval92.4%
div-inv92.6%
expm1-log1p-u38.0%
expm1-udef6.0%
Applied egg-rr6.0%
expm1-def38.0%
expm1-log1p92.6%
Simplified92.6%
Final simplification94.9%
(FPCore (x y)
:precision binary64
(if (<= y -9.2e+36)
(+ 1.0 (/ (/ y (sqrt x)) -3.0))
(if (<= y 1.28e+36)
(+ 1.0 (/ -0.1111111111111111 x))
(+ 1.0 (/ (/ y -3.0) (sqrt x))))))
double code(double x, double y) {
double tmp;
if (y <= -9.2e+36) {
tmp = 1.0 + ((y / sqrt(x)) / -3.0);
} else if (y <= 1.28e+36) {
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 <= (-9.2d+36)) then
tmp = 1.0d0 + ((y / sqrt(x)) / (-3.0d0))
else if (y <= 1.28d+36) 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 <= -9.2e+36) {
tmp = 1.0 + ((y / Math.sqrt(x)) / -3.0);
} else if (y <= 1.28e+36) {
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 <= -9.2e+36: tmp = 1.0 + ((y / math.sqrt(x)) / -3.0) elif y <= 1.28e+36: 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 <= -9.2e+36) tmp = Float64(1.0 + Float64(Float64(y / sqrt(x)) / -3.0)); elseif (y <= 1.28e+36) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(1.0 + Float64(Float64(y / -3.0) / sqrt(x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -9.2e+36) tmp = 1.0 + ((y / sqrt(x)) / -3.0); elseif (y <= 1.28e+36) 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, -9.2e+36], N[(1.0 + N[(N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.28e+36], N[(1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(y / -3.0), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{+36}:\\
\;\;\;\;1 + \frac{\frac{y}{\sqrt{x}}}{-3}\\
\mathbf{elif}\;y \leq 1.28 \cdot 10^{+36}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{y}{-3}}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -9.19999999999999986e36Initial program 99.4%
sub-neg99.4%
distribute-frac-neg99.4%
+-commutative99.4%
associate-+r-99.4%
+-commutative99.4%
associate-+r-99.4%
neg-mul-199.4%
*-commutative99.4%
associate-*r/99.3%
fma-neg99.3%
associate-/r*99.2%
metadata-eval99.2%
*-commutative99.2%
associate-/r*99.2%
distribute-neg-frac99.2%
metadata-eval99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in y around inf 86.4%
associate-*r*86.4%
Simplified86.4%
sqrt-div86.3%
metadata-eval86.3%
div-inv86.3%
expm1-log1p-u53.8%
expm1-udef10.6%
Applied egg-rr10.6%
expm1-def53.8%
expm1-log1p86.3%
Simplified86.3%
div-inv86.3%
*-commutative86.3%
metadata-eval86.3%
div-inv86.5%
associate-/r*86.4%
*-commutative86.4%
div-inv86.5%
associate-/r*86.5%
Applied egg-rr86.5%
if -9.19999999999999986e36 < y < 1.27999999999999993e36Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate-+r-99.8%
neg-mul-199.8%
*-commutative99.8%
associate-*r/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 99.3%
if 1.27999999999999993e36 < y Initial program 99.5%
sub-neg99.5%
distribute-frac-neg99.5%
+-commutative99.5%
associate-+r-99.5%
+-commutative99.5%
associate-+r-99.5%
neg-mul-199.5%
*-commutative99.5%
associate-*r/99.5%
fma-neg99.5%
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 inf 92.5%
associate-*r*92.4%
Simplified92.4%
sqrt-div92.4%
metadata-eval92.4%
div-inv92.6%
expm1-log1p-u38.0%
expm1-udef6.0%
Applied egg-rr6.0%
expm1-def38.0%
expm1-log1p92.6%
Simplified92.6%
associate-*l/92.5%
*-un-lft-identity92.5%
times-frac92.6%
metadata-eval92.6%
metadata-eval92.6%
times-frac92.5%
*-un-lft-identity92.5%
associate-/r*92.6%
Applied egg-rr92.6%
Final simplification94.9%
(FPCore (x y)
:precision binary64
(if (<= y -2.4e+38)
(+ 1.0 (/ (/ y (sqrt x)) -3.0))
(if (<= y 9.8e+35)
(- 1.0 (pow (* x 9.0) -1.0))
(+ 1.0 (/ (/ y -3.0) (sqrt x))))))
double code(double x, double y) {
double tmp;
if (y <= -2.4e+38) {
tmp = 1.0 + ((y / sqrt(x)) / -3.0);
} else if (y <= 9.8e+35) {
tmp = 1.0 - pow((x * 9.0), -1.0);
} else {
tmp = 1.0 + ((y / -3.0) / sqrt(x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-2.4d+38)) then
tmp = 1.0d0 + ((y / sqrt(x)) / (-3.0d0))
else if (y <= 9.8d+35) then
tmp = 1.0d0 - ((x * 9.0d0) ** (-1.0d0))
else
tmp = 1.0d0 + ((y / (-3.0d0)) / sqrt(x))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -2.4e+38) {
tmp = 1.0 + ((y / Math.sqrt(x)) / -3.0);
} else if (y <= 9.8e+35) {
tmp = 1.0 - Math.pow((x * 9.0), -1.0);
} else {
tmp = 1.0 + ((y / -3.0) / Math.sqrt(x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -2.4e+38: tmp = 1.0 + ((y / math.sqrt(x)) / -3.0) elif y <= 9.8e+35: tmp = 1.0 - math.pow((x * 9.0), -1.0) else: tmp = 1.0 + ((y / -3.0) / math.sqrt(x)) return tmp
function code(x, y) tmp = 0.0 if (y <= -2.4e+38) tmp = Float64(1.0 + Float64(Float64(y / sqrt(x)) / -3.0)); elseif (y <= 9.8e+35) tmp = Float64(1.0 - (Float64(x * 9.0) ^ -1.0)); else tmp = Float64(1.0 + Float64(Float64(y / -3.0) / sqrt(x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -2.4e+38) tmp = 1.0 + ((y / sqrt(x)) / -3.0); elseif (y <= 9.8e+35) tmp = 1.0 - ((x * 9.0) ^ -1.0); else tmp = 1.0 + ((y / -3.0) / sqrt(x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -2.4e+38], N[(1.0 + N[(N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision] / -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.8e+35], N[(1.0 - N[Power[N[(x * 9.0), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision], N[(1.0 + N[(N[(y / -3.0), $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.4 \cdot 10^{+38}:\\
\;\;\;\;1 + \frac{\frac{y}{\sqrt{x}}}{-3}\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{+35}:\\
\;\;\;\;1 - {\left(x \cdot 9\right)}^{-1}\\
\mathbf{else}:\\
\;\;\;\;1 + \frac{\frac{y}{-3}}{\sqrt{x}}\\
\end{array}
\end{array}
if y < -2.40000000000000017e38Initial program 99.4%
sub-neg99.4%
distribute-frac-neg99.4%
+-commutative99.4%
associate-+r-99.4%
+-commutative99.4%
associate-+r-99.4%
neg-mul-199.4%
*-commutative99.4%
associate-*r/99.3%
fma-neg99.3%
associate-/r*99.2%
metadata-eval99.2%
*-commutative99.2%
associate-/r*99.2%
distribute-neg-frac99.2%
metadata-eval99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in y around inf 86.4%
associate-*r*86.4%
Simplified86.4%
sqrt-div86.3%
metadata-eval86.3%
div-inv86.3%
expm1-log1p-u53.8%
expm1-udef10.6%
Applied egg-rr10.6%
expm1-def53.8%
expm1-log1p86.3%
Simplified86.3%
div-inv86.3%
*-commutative86.3%
metadata-eval86.3%
div-inv86.5%
associate-/r*86.4%
*-commutative86.4%
div-inv86.5%
associate-/r*86.5%
Applied egg-rr86.5%
if -2.40000000000000017e38 < y < 9.8000000000000005e35Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate-+r-99.8%
neg-mul-199.8%
*-commutative99.8%
associate-*r/99.8%
fma-neg99.8%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 99.3%
add-sqr-sqrt0.0%
sqrt-unprod54.1%
pow154.1%
frac-times54.1%
metadata-eval54.1%
metadata-eval54.1%
frac-times54.1%
pow-prod-down54.1%
pow-prod-up54.1%
metadata-eval54.1%
associate-/r*54.1%
*-commutative54.1%
pow-plus54.1%
pow154.1%
sqrt-unprod54.1%
add-sqr-sqrt54.1%
frac-2neg54.1%
metadata-eval54.1%
div-inv54.1%
distribute-rgt-neg-in54.1%
metadata-eval54.1%
metadata-eval54.1%
div-inv54.1%
clear-num54.1%
Applied egg-rr54.1%
add-sqr-sqrt0.0%
sqrt-unprod76.4%
pow176.4%
frac-times76.4%
metadata-eval76.4%
metadata-eval76.4%
frac-times76.4%
pow-prod-down76.4%
pow-prod-up76.4%
metadata-eval76.4%
associate-/r*76.4%
*-commutative76.4%
pow-plus76.4%
pow176.4%
sqrt-unprod99.1%
add-sqr-sqrt99.4%
inv-pow99.4%
Applied egg-rr99.4%
if 9.8000000000000005e35 < y Initial program 99.5%
sub-neg99.5%
distribute-frac-neg99.5%
+-commutative99.5%
associate-+r-99.5%
+-commutative99.5%
associate-+r-99.5%
neg-mul-199.5%
*-commutative99.5%
associate-*r/99.5%
fma-neg99.5%
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 inf 92.5%
associate-*r*92.4%
Simplified92.4%
sqrt-div92.4%
metadata-eval92.4%
div-inv92.6%
expm1-log1p-u38.0%
expm1-udef6.0%
Applied egg-rr6.0%
expm1-def38.0%
expm1-log1p92.6%
Simplified92.6%
associate-*l/92.5%
*-un-lft-identity92.5%
times-frac92.6%
metadata-eval92.6%
metadata-eval92.6%
times-frac92.5%
*-un-lft-identity92.5%
associate-/r*92.6%
Applied egg-rr92.6%
Final simplification95.0%
(FPCore (x y) :precision binary64 (+ (- 1.0 (/ 0.1111111111111111 x)) (* -0.3333333333333333 (* y (pow x -0.5)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y * pow(x, -0.5)));
}
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 * (x ** (-0.5d0))))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y * Math.pow(x, -0.5)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y * math.pow(x, -0.5)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) + Float64(-0.3333333333333333 * Float64(y * (x ^ -0.5)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y * (x ^ -0.5))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] + N[(-0.3333333333333333 * N[(y * N[Power[x, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \left(y \cdot {x}^{-0.5}\right)
\end{array}
Initial program 99.7%
sub-neg99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
distribute-frac-neg99.6%
neg-mul-199.6%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
clear-num99.6%
associate-/r/99.6%
pow1/299.6%
pow-flip99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Final simplification99.6%
(FPCore (x y) :precision binary64 (+ (- 1.0 (/ 0.1111111111111111 x)) (* -0.3333333333333333 (/ y (sqrt x)))))
double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / sqrt(x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 - (0.1111111111111111d0 / x)) + ((-0.3333333333333333d0) * (y / sqrt(x)))
end function
public static double code(double x, double y) {
return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / Math.sqrt(x)));
}
def code(x, y): return (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / math.sqrt(x)))
function code(x, y) return Float64(Float64(1.0 - Float64(0.1111111111111111 / x)) + Float64(-0.3333333333333333 * Float64(y / sqrt(x)))) end
function tmp = code(x, y) tmp = (1.0 - (0.1111111111111111 / x)) + (-0.3333333333333333 * (y / sqrt(x))); end
code[x_, y_] := N[(N[(1.0 - N[(0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision] + N[(-0.3333333333333333 * N[(y / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(1 - \frac{0.1111111111111111}{x}\right) + -0.3333333333333333 \cdot \frac{y}{\sqrt{x}}
\end{array}
Initial program 99.7%
sub-neg99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
distribute-frac-neg99.6%
neg-mul-199.6%
times-frac99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ -1.0 (/ -0.1111111111111111 x))))
(if (<= y -5.8e+134)
(/
(+ -1.0 (* (* (/ 0.1111111111111111 x) -0.1111111111111111) (/ 1.0 x)))
t_0)
(if (<= y 5.5e+139)
(+ 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 <= -5.8e+134) {
tmp = (-1.0 + (((0.1111111111111111 / x) * -0.1111111111111111) * (1.0 / x))) / t_0;
} else if (y <= 5.5e+139) {
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 <= (-5.8d+134)) then
tmp = ((-1.0d0) + (((0.1111111111111111d0 / x) * (-0.1111111111111111d0)) * (1.0d0 / x))) / t_0
else if (y <= 5.5d+139) 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 <= -5.8e+134) {
tmp = (-1.0 + (((0.1111111111111111 / x) * -0.1111111111111111) * (1.0 / x))) / t_0;
} else if (y <= 5.5e+139) {
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 <= -5.8e+134: tmp = (-1.0 + (((0.1111111111111111 / x) * -0.1111111111111111) * (1.0 / x))) / t_0 elif y <= 5.5e+139: 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 <= -5.8e+134) tmp = Float64(Float64(-1.0 + Float64(Float64(Float64(0.1111111111111111 / x) * -0.1111111111111111) * Float64(1.0 / x))) / t_0); elseif (y <= 5.5e+139) 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 <= -5.8e+134) tmp = (-1.0 + (((0.1111111111111111 / x) * -0.1111111111111111) * (1.0 / x))) / t_0; elseif (y <= 5.5e+139) 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, -5.8e+134], N[(N[(-1.0 + N[(N[(N[(0.1111111111111111 / x), $MachinePrecision] * -0.1111111111111111), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[y, 5.5e+139], 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 -5.8 \cdot 10^{+134}:\\
\;\;\;\;\frac{-1 + \left(\frac{0.1111111111111111}{x} \cdot -0.1111111111111111\right) \cdot \frac{1}{x}}{t\_0}\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+139}:\\
\;\;\;\;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 < -5.80000000000000023e134Initial program 99.4%
sub-neg99.4%
distribute-frac-neg99.4%
+-commutative99.4%
associate-+r-99.4%
+-commutative99.4%
associate-+r-99.4%
neg-mul-199.4%
*-commutative99.4%
associate-*r/99.3%
fma-neg99.3%
associate-/r*99.1%
metadata-eval99.1%
*-commutative99.1%
associate-/r*99.1%
distribute-neg-frac99.1%
metadata-eval99.1%
metadata-eval99.1%
Simplified99.1%
Taylor expanded in y around 0 3.4%
add-sqr-sqrt0.0%
sqrt-unprod15.6%
pow115.6%
frac-times15.6%
metadata-eval15.6%
metadata-eval15.6%
frac-times15.6%
pow-prod-down15.6%
pow-prod-up15.6%
metadata-eval15.6%
associate-/r*15.6%
*-commutative15.6%
pow-plus15.6%
pow115.6%
sqrt-unprod5.5%
add-sqr-sqrt5.5%
frac-2neg5.5%
metadata-eval5.5%
div-inv5.5%
distribute-rgt-neg-in5.5%
metadata-eval5.5%
metadata-eval5.5%
div-inv5.5%
clear-num5.5%
Applied egg-rr5.5%
+-commutative5.5%
flip-+15.6%
swap-sqr15.6%
metadata-eval15.6%
*-un-lft-identity15.6%
frac-times15.6%
metadata-eval15.6%
pow215.6%
metadata-eval15.6%
add-sqr-sqrt15.6%
sqrt-unprod4.1%
mul-1-neg4.1%
mul-1-neg4.1%
sqr-neg4.1%
sqrt-unprod0.0%
add-sqr-sqrt3.4%
Applied egg-rr3.4%
metadata-eval3.4%
unpow23.4%
frac-times3.4%
div-inv3.4%
associate-*r*3.4%
add-sqr-sqrt0.0%
sqrt-unprod15.6%
frac-times15.6%
metadata-eval15.6%
metadata-eval15.6%
frac-times15.6%
sqrt-unprod15.6%
add-sqr-sqrt15.6%
Applied egg-rr15.6%
if -5.80000000000000023e134 < y < 5.4999999999999996e139Initial program 99.8%
sub-neg99.8%
distribute-frac-neg99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate-+r-99.8%
neg-mul-199.8%
*-commutative99.8%
associate-*r/99.7%
fma-neg99.7%
associate-/r*99.8%
metadata-eval99.8%
*-commutative99.8%
associate-/r*99.7%
distribute-neg-frac99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 85.2%
if 5.4999999999999996e139 < y Initial program 99.6%
sub-neg99.6%
distribute-frac-neg99.6%
+-commutative99.6%
associate-+r-99.6%
+-commutative99.6%
associate-+r-99.6%
neg-mul-199.6%
*-commutative99.6%
associate-*r/99.6%
fma-neg99.5%
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.0%
add-sqr-sqrt0.0%
sqrt-unprod0.7%
pow10.7%
frac-times0.7%
metadata-eval0.7%
metadata-eval0.7%
frac-times0.7%
pow-prod-down0.7%
pow-prod-up0.7%
metadata-eval0.7%
associate-/r*0.7%
*-commutative0.7%
pow-plus0.7%
pow10.7%
sqrt-unprod0.7%
add-sqr-sqrt0.7%
frac-2neg0.7%
metadata-eval0.7%
div-inv0.7%
distribute-rgt-neg-in0.7%
metadata-eval0.7%
metadata-eval0.7%
div-inv0.7%
clear-num0.7%
Applied egg-rr0.7%
+-commutative0.7%
flip-+0.7%
swap-sqr0.7%
metadata-eval0.7%
*-un-lft-identity0.7%
frac-times0.7%
metadata-eval0.7%
pow20.7%
metadata-eval0.7%
add-sqr-sqrt0.7%
sqrt-unprod0.7%
mul-1-neg0.7%
mul-1-neg0.7%
sqr-neg0.7%
sqrt-unprod0.0%
add-sqr-sqrt25.8%
Applied egg-rr25.8%
metadata-eval25.8%
unpow225.8%
frac-times25.8%
Applied egg-rr25.8%
Final simplification67.0%
(FPCore (x y)
:precision binary64
(if (<= y 5.5e+139)
(+ 1.0 (/ -0.1111111111111111 x))
(/
(+ -1.0 (* (/ 0.1111111111111111 x) (/ 0.1111111111111111 x)))
(+ -1.0 (/ -0.1111111111111111 x)))))
double code(double x, double y) {
double tmp;
if (y <= 5.5e+139) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (-1.0 + ((0.1111111111111111 / x) * (0.1111111111111111 / 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 <= 5.5d+139) then
tmp = 1.0d0 + ((-0.1111111111111111d0) / x)
else
tmp = ((-1.0d0) + ((0.1111111111111111d0 / x) * (0.1111111111111111d0 / x))) / ((-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+139) {
tmp = 1.0 + (-0.1111111111111111 / x);
} else {
tmp = (-1.0 + ((0.1111111111111111 / x) * (0.1111111111111111 / x))) / (-1.0 + (-0.1111111111111111 / x));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 5.5e+139: tmp = 1.0 + (-0.1111111111111111 / x) else: tmp = (-1.0 + ((0.1111111111111111 / x) * (0.1111111111111111 / x))) / (-1.0 + (-0.1111111111111111 / x)) return tmp
function code(x, y) tmp = 0.0 if (y <= 5.5e+139) tmp = Float64(1.0 + Float64(-0.1111111111111111 / x)); else tmp = Float64(Float64(-1.0 + Float64(Float64(0.1111111111111111 / x) * Float64(0.1111111111111111 / x))) / Float64(-1.0 + Float64(-0.1111111111111111 / x))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 5.5e+139) tmp = 1.0 + (-0.1111111111111111 / x); else tmp = (-1.0 + ((0.1111111111111111 / x) * (0.1111111111111111 / x))) / (-1.0 + (-0.1111111111111111 / x)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 5.5e+139], 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] / N[(-1.0 + N[(-0.1111111111111111 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.5 \cdot 10^{+139}:\\
\;\;\;\;1 + \frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1 + \frac{0.1111111111111111}{x} \cdot \frac{0.1111111111111111}{x}}{-1 + \frac{-0.1111111111111111}{x}}\\
\end{array}
\end{array}
if y < 5.4999999999999996e139Initial program 99.7%
sub-neg99.7%
distribute-frac-neg99.7%
+-commutative99.7%
associate-+r-99.7%
+-commutative99.7%
associate-+r-99.7%
neg-mul-199.7%
*-commutative99.7%
associate-*r/99.7%
fma-neg99.7%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 71.2%
if 5.4999999999999996e139 < y Initial program 99.6%
sub-neg99.6%
distribute-frac-neg99.6%
+-commutative99.6%
associate-+r-99.6%
+-commutative99.6%
associate-+r-99.6%
neg-mul-199.6%
*-commutative99.6%
associate-*r/99.6%
fma-neg99.5%
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.0%
add-sqr-sqrt0.0%
sqrt-unprod0.7%
pow10.7%
frac-times0.7%
metadata-eval0.7%
metadata-eval0.7%
frac-times0.7%
pow-prod-down0.7%
pow-prod-up0.7%
metadata-eval0.7%
associate-/r*0.7%
*-commutative0.7%
pow-plus0.7%
pow10.7%
sqrt-unprod0.7%
add-sqr-sqrt0.7%
frac-2neg0.7%
metadata-eval0.7%
div-inv0.7%
distribute-rgt-neg-in0.7%
metadata-eval0.7%
metadata-eval0.7%
div-inv0.7%
clear-num0.7%
Applied egg-rr0.7%
+-commutative0.7%
flip-+0.7%
swap-sqr0.7%
metadata-eval0.7%
*-un-lft-identity0.7%
frac-times0.7%
metadata-eval0.7%
pow20.7%
metadata-eval0.7%
add-sqr-sqrt0.7%
sqrt-unprod0.7%
mul-1-neg0.7%
mul-1-neg0.7%
sqr-neg0.7%
sqrt-unprod0.0%
add-sqr-sqrt25.8%
Applied egg-rr25.8%
metadata-eval25.8%
unpow225.8%
frac-times25.8%
Applied egg-rr25.8%
Final simplification65.2%
(FPCore (x y) :precision binary64 (if (<= x 0.11) (/ -0.1111111111111111 x) 1.0))
double code(double x, double y) {
double tmp;
if (x <= 0.11) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 1.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= 0.11d0) then
tmp = (-0.1111111111111111d0) / x
else
tmp = 1.0d0
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= 0.11) {
tmp = -0.1111111111111111 / x;
} else {
tmp = 1.0;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= 0.11: tmp = -0.1111111111111111 / x else: tmp = 1.0 return tmp
function code(x, y) tmp = 0.0 if (x <= 0.11) tmp = Float64(-0.1111111111111111 / x); else tmp = 1.0; end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= 0.11) tmp = -0.1111111111111111 / x; else tmp = 1.0; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, 0.11], N[(-0.1111111111111111 / x), $MachinePrecision], 1.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 0.11:\\
\;\;\;\;\frac{-0.1111111111111111}{x}\\
\mathbf{else}:\\
\;\;\;\;1\\
\end{array}
\end{array}
if x < 0.110000000000000001Initial program 99.6%
sub-neg99.6%
distribute-frac-neg99.6%
+-commutative99.6%
associate-+r-99.6%
+-commutative99.6%
associate-+r-99.6%
neg-mul-199.6%
*-commutative99.6%
associate-*r/99.5%
fma-neg99.5%
associate-/r*99.6%
metadata-eval99.6%
*-commutative99.6%
associate-/r*99.5%
distribute-neg-frac99.5%
metadata-eval99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 60.7%
add-sqr-sqrt0.0%
sqrt-unprod4.6%
pow14.6%
frac-times4.6%
metadata-eval4.6%
metadata-eval4.6%
frac-times4.6%
pow-prod-down4.6%
pow-prod-up4.6%
metadata-eval4.6%
associate-/r*4.6%
*-commutative4.6%
pow-plus4.6%
pow14.6%
sqrt-unprod1.6%
add-sqr-sqrt1.6%
frac-2neg1.6%
metadata-eval1.6%
div-inv1.6%
distribute-rgt-neg-in1.6%
metadata-eval1.6%
metadata-eval1.6%
div-inv1.6%
clear-num1.6%
Applied egg-rr1.6%
+-commutative1.6%
flip-+4.6%
swap-sqr4.6%
metadata-eval4.6%
*-un-lft-identity4.6%
frac-times4.6%
metadata-eval4.6%
pow24.6%
metadata-eval4.6%
add-sqr-sqrt4.6%
sqrt-unprod1.1%
mul-1-neg1.1%
mul-1-neg1.1%
sqr-neg1.1%
sqrt-unprod0.0%
add-sqr-sqrt33.5%
Applied egg-rr33.5%
Taylor expanded in x around 0 60.4%
if 0.110000000000000001 < x Initial program 99.7%
sub-neg99.7%
distribute-frac-neg99.7%
+-commutative99.7%
associate-+r-99.7%
+-commutative99.7%
associate-+r-99.7%
neg-mul-199.7%
*-commutative99.7%
associate-*r/99.8%
fma-neg99.8%
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 63.9%
add-sqr-sqrt0.0%
sqrt-unprod63.2%
pow163.2%
frac-times63.2%
metadata-eval63.2%
metadata-eval63.2%
frac-times63.2%
pow-prod-down63.2%
pow-prod-up63.2%
metadata-eval63.2%
associate-/r*63.2%
*-commutative63.2%
pow-plus63.2%
pow163.2%
sqrt-unprod63.2%
add-sqr-sqrt63.2%
frac-2neg63.2%
metadata-eval63.2%
div-inv63.2%
distribute-rgt-neg-in63.2%
metadata-eval63.2%
metadata-eval63.2%
div-inv63.2%
clear-num63.2%
Applied egg-rr63.2%
Taylor expanded in x around inf 63.2%
Final simplification61.8%
(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%
sub-neg99.7%
distribute-frac-neg99.7%
+-commutative99.7%
associate-+r-99.7%
+-commutative99.7%
associate-+r-99.7%
neg-mul-199.7%
*-commutative99.7%
associate-*r/99.7%
fma-neg99.6%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 62.3%
Final simplification62.3%
(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%
sub-neg99.7%
distribute-frac-neg99.7%
+-commutative99.7%
associate-+r-99.7%
+-commutative99.7%
associate-+r-99.7%
neg-mul-199.7%
*-commutative99.7%
associate-*r/99.7%
fma-neg99.6%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 62.3%
add-sqr-sqrt0.0%
sqrt-unprod34.6%
pow134.6%
frac-times34.6%
metadata-eval34.6%
metadata-eval34.6%
frac-times34.6%
pow-prod-down34.6%
pow-prod-up34.6%
metadata-eval34.6%
associate-/r*34.6%
*-commutative34.6%
pow-plus34.6%
pow134.6%
sqrt-unprod33.1%
add-sqr-sqrt33.1%
frac-2neg33.1%
metadata-eval33.1%
div-inv33.1%
distribute-rgt-neg-in33.1%
metadata-eval33.1%
metadata-eval33.1%
div-inv33.1%
clear-num33.1%
Applied egg-rr33.1%
Taylor expanded in x around inf 33.1%
Final simplification33.1%
(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 2024036
(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)))))