#17157: Improve formula for Bell numbers
----------------------------------+------------------------
Reporter: jdemeyer | Owner:
Type: enhancement | Status: new
Priority: minor | Milestone: sage-6.4
Component: combinatorics | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
----------------------------------+------------------------
Description changed by jdemeyer:
Old description:
> In the function `bell_number`, we have the line
> {{{
> return ZZ(ceil(N((b - n) / n2 * exp2(Integer(-1)) - 1 / 4, log(b, 2) +
> 3)))
> }}}
>
> This can be improved by
> 1. Using a `RealField` instead of the `N()` function.
> 1. Removing the `1 / 4` which is actually `0` in Python 2 and rounding
> up.
> 1. Removing the `-n` which is nowhere mentioned in the mathematical
> formula.
> 1. Not using global functions like `ceil()` and `exp()`.
New description:
Improve the error analysis for the implementation of Dobinski's formula to
compute the Bell numbers.
--
--
Ticket URL: <http://trac.sagemath.org/ticket/17157#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" 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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.