CAS bug when calculating sum(1/n,n,1,medium_value)
|
10-10-2023, 10:28 AM
Post: #4
|
|||
|
|||
RE: CAS bug when calculating sum(1/n,n,1,medium_value)
Don't forget that if your input is exact, the CAS tries to return an exact answer. For sums with numeric exact bounds like here, it means we compute the exact rational fraction 1+1/2+1/3+...1/n, and at some point numerator and denominator size will exceed the upper bound for integers.
For very large values of n, the number of terms in the sum will exceed the upper bound for the number of terms in a sum. In that situation, it will handle the sum as if you entered a symbolic upper bound, and for 1/n, there is a discrete antiderivative sum(1/n,n,1,N) -> Psi(N+1)+euler_gamma therefore you can compute the sum in closed form for very large value of N. Like for integration, if you want to compute a numeric approximation of a sum, you should give an approx input, for example sum(1.0/n,n,1,10000). That's what you do in Home, without having to explicitly convert 1 to 1.0, because HOME does approx computations. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)