id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,merged,author,reviewer,upstream,work_issues,branch,commit,dependencies,stopgaps
17159,Stirling numbers at negative integers,pluschny,,"Inconsistent behaviour of the Stirling numbers at negative integers
and insufficient documentation of these cases.
(1) stirling_number2(-3, -5) gives OverflowError.
(2) stirling_number2(-3, -5,""maxima"") gives TypeError.
(3) stirling_number2(-3, -5, ""gap"") gives 35 which is correct but this
behaviour is not documented (doc says: n and k are nonnegative integers).
(4) stirling_number1(-3, -5) gives 25 which is correct but this
behaviour is not documented (doc implies that n and k are nonnegative integers).
Proposal: Make GAP’s Stirling2 the default (as is GAP’s Stirling1)
and document the behaviour for negative integers. (Perhaps disregard
'maxima' and the native implementation altogether?)
Remark: The behaviour of GAP's implementation is based on a simple and
coherent extension of the Stirling numbers to negative integers n, k
which was outlined by Graham/Knuth/Patashnik in 'Concrete Mathematics'
Section 6.1 (see Table 253).
Also, use libGAP not GAP, as was done in #16719.",defect,new,minor,sage-6.4,combinatorics,,Stirling numbers,,,,,N/A,,,,,