| 645 | Sage's implementation splitting the computation of the Stirling |

| 646 | numbers of the second kind in two cases according to `n`, let us |

| 647 | check the result it gives agree with both maxima and gap. |

| 648 | |

| 649 | For `n<200`:: |

| 650 | |

| 651 | sage: for n in Subsets(range(100,200), 5).random_element(): |

| 652 | ... for k in Subsets(range(n), 5).random_element(): |

| 653 | ... s_sage = stirling_number2(n,k) |

| 654 | ... s_maxima = stirling_number2(n,k, algorithm = "maxima") |

| 655 | ... s_gap = stirling_number2(n,k, algorithm = "gap") |

| 656 | ... if not (s_sage == s_maxima and s_sage == s_gap): |

| 657 | ... print "Error with n<200" |

| 658 | |

| 659 | For `n\geq 200`:: |

| 660 | |

| 661 | sage: for n in Subsets(range(200,300), 5).random_element(): |

| 662 | ... for k in Subsets(range(n), 5).random_element(): |

| 663 | ... s_sage = stirling_number2(n,k) |

| 664 | ... s_maxima = stirling_number2(n,k, algorithm = "maxima") |

| 665 | ... s_gap = stirling_number2(n,k, algorithm = "gap") |

| 666 | ... if not (s_sage == s_maxima and s_sage == s_gap): |

| 667 | ... print "Error with n<200" |