Maybe this bit from the docstring is causing confusion:

When x is a polynomial f of a single variable y of order >= 1,
rf(x,k) = f(y) * f(y+1) * ... * f(x+k-1) as described in
Peter Paule, "Greatest Factorial Factorization and Symbolic Summation",
Journal of Symbolic Computation, vol. 20, pp. 235-268, 1995.

So rf(x**3, 2) is x**3*(x + 1)**3.

I'm not sure why this definition is made. It seems like a bad one,
since there are two different ways to interpret rf(a, b) if a is a
polynomial.  It looks like this was changed in
https://github.com/sympy/sympy/pull/8941.

For the other two, I get the same thing as the docstring in SymPy 1.0

>>> rf(x, k).rewrite(binomial)
binomial(k + x - 1, k)*factorial(k)
>>> rf(n, k).rewrite(factorial)
factorial(k + n - 1)/factorial(n - 1)

These seem mathematically correct.

It seems all three of these changed from SymPy 0.7.6 to SymPy 1.0.

Aaron Meurer

On Thu, Apr 28, 2016 at 5:28 PM, Peter Luschny <[email protected]> wrote:
>> We still haven't updated SymPy Live to SymPy 1.0, so the output of
>> some examples may be different.
>
>
> Thanks! Maybe I expressed myself misleading. Also the output in my
> yupyter notebook did not correspond to what is in the documentation.
>
> I have difficulty to understand the output of the three calls
> below which are taken from the doc-pages I cited.
> -----------------------------------------------------
> from sympy import rf, symbols, factorial, ff, binomial
> from sympy.abc import x
> n, k = symbols('n k', integer=True)
>
> rf(x**3, 2)                 # ? x**3*(x**3 + 1)
>
> rf(x, k).rewrite(binomial)  # ? RisingFactorial(x, k)
>
> rf(n, k).rewrite(factorial) # ? RisingFactorial(n, k)
> -----------------------------------------------------
>
> Perhaps someone can enlighten me what to expect
> and to tell me if the output of SymPy 1.0 is correct?
>
> Peter
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/ad6fe0f9-d9b2-411a-ba3d-dc4b9378655a%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6JbM%2BPyYz5fND%2BtUfX6%3D-kNW5Hf%2B5uoKFvd7Mv-K8gPcQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to