ratexpand + pochhammer



Except for pure numerical evaluation, automatic expansion of the
rising factorial (pochhammer) isn't all that useful, I think.  There
is a question about what to do with pochhammer(x,10^9); and what about
pochhammer(x,10^9 + 1) / pochhammer(x,10^9))?

I propose that user should have to call to expand to force expansion. I
know how to
do this with expand, but not ratexpand:

(%i27) pochhammer(x,8);
(%o27) pochhammer(x,8)

(%i28) expand(%);
(%o28) x^8+28*x^7+322*x^6+1960*x^5+6769*x^4+13132*x^3+13068*x^2+5040*x

(%i29) pochhammer(x,8);
(%o29) pochhammer(x,8)

(%i30) ratexpand(%);
(%o30) pochhammer(x,8)

The bit of code that does the expand is (code in simp-pochhammer)

 ((and (integerp n) (< n $expop))
    (let ((acc ($rat 1)) (return-a-rat ($ratp x)))
      (setq x ($rat x))
      (dotimes (k n)
        (setq acc (mul acc (add k x))))
      (if return-a-rat acc ($ratdisrep acc))))

I have the same ratexpand problem for some other code that I've worked on.
Suggestions?

Barton