sagemath/sage

allow to use flint for Stirling numbers

fchapoton opened this issue · 22 comments

of both kind

CC: @tscrim @slel @kliem @kwankyu

Component: combinatorics

Author: Frédéric Chapoton

Branch/Commit: bbd7807

Reviewer: Marc Mezzarobba, Travis Scrimshaw

Issue created by migration from https://trac.sagemath.org/ticket/33733

Commit: adf1244

New commits:

adf1244allow to use flint for Stirling numbers of both kind

Branch pushed to git repo; I updated commit sha1. New commits:

722c2dbfix indentation

Changed commit from adf1244 to 722c2db

Branch pushed to git repo; I updated commit sha1. New commits:

384ac6eremove duplicate TEST

Changed commit from 722c2db to 384ac6e

comment:4

green bot, so please review

comment:5

Maybe one should not remove the maxima algorithm, which is not using the pexpect interface in fact ?

comment:6

I agree that it would be better not to remove the algorithm="maxima" option without deprecating it first.

As far as I understand, the native Sage implementation of the Stirling numbers of the second kind and the Sage implementation were both written by Fredrik. Is the native Sage version better in some way? Do we need to keep it at all?

Would it make sense to change the default implementation for some of the functions?

A minor style point: why do you write

def stirling_number1(n, k, algorithm=None) -> Integer:
    ...
    if algorithm is None:
        algorithm='gap'

rather than

def stirling_number1(n, k, algorithm="gap") -> Integer:
    ...

?

Branch pushed to git repo; I updated commit sha1. New commits:

42d5b69Merge branch 'u/chapoton/33733' in 9.6.rc1
bbd7807re-add maxima algo for Stirling

Changed commit from 384ac6e to bbd7807

comment:8

voila, j'ai remis l'algorithme "maxima" en place

comment:9

et le patchbot est tout vert

Description changed:

--- 
+++ 
@@ -1,3 +1 @@
 of both kind
-
-also get rid of slow usage of maxima pexpect interface
comment:11

please review

comment:12

What about Marc's other questions in comment:6?

comment:13

As far as I understand, the native Sage implementation of the Stirling numbers of the second kind and the Sage implementation were both written by Fredrik. Is the native Sage version better in some way? Do we need to keep it at all?

Would it make sense to change the default implementation for some of the functions?

I have no idea, and do not plan to investigate

comment:15

may we please move forward here ?

Reviewer: Marc Mezzarobba, Travis Scrimshaw

comment:16

Sorry, I lost track of this. Thank you. LGTM.

Changed branch from u/chapoton/33733 to bbd7807