Improve formula for Bell numbers
Round down instead of up
Merge commit 'b69be0da26e43f9454e676867afb54de530d2a58' into HEAD
Add FLINT implementation of Bell numbers
Merge commit 'ff27bdc5d87967d0e7fd5c1305cef4340db816c7' into ticket/17157
Trac #17203: make pwd the default directory for the ipython notebook
Trac #17203: Make sage -notebook=ipython land by default in pwd

Since #16996 the default directory of {{{sage -notebook=ipython}}} is
{{{DOT_SAGE/notebooks_ipython/}}} following the old notebook. In the old
Sage notebook, each worksheet was a directory and even each single cell
was stored in its own directory. Therefore, there was no notion of
"present working directory" at all. With the ipython notebook, each
worksheet lives in one present working directory chosen by the user.
That is one of the main point of the ipython notebook philosophy and we
should not change that in Sage. See the post of Fernando Perez about
difference between the ipython notebook and the Sage notebook:

   ''"This is a key difference of our approach and the Sage notebook, so
it' worth clarifying what I mean, the key point being the execution
model and its relation to the filesystem.  The Sage notebook took the
route of using the filesystem for notebook operations, so you can't
meaningfully use 'ls' in it or move around the filesystem yourself with
'cd', because Sage will always execute your code in hidden directories
with each cell actually being a separate subdirectory.  This is a
perfectly valid approach and has a number of very good consequences for
the Sage notebook, but it is also very different from the IPython model
where we always keep the user very close to the filesystem and OS.  For
us, it's really important that you can access local scripts, use %run,
see arbitrary files conveniently, etc., as these are routine needs in
data analysis and numerical simulation."'' (Fernando Perez,
[http://blog.fperez.org/2012/01/ipython-notebook-historical.html The
IPython notebook: a historical retrospective], January 2012)

Let's change the default directory so that it is equal to the present
working directory (`pwd`) as it is the nice way of using ipython.

[https://groups.google.com/d/topic/sage-devel/NxN_oCasrkA/discussion See
the related discussion and vote on sage-devel].

URL: http://trac.sagemath.org/17203
Reported by: slabbe
Ticket author(s): Sébastien Labbé
Reviewer(s): Volker Braun
Trac #17157: Improve formula for Bell numbers

Improve the error analysis for the implementation of Dobinski's formula
to compute the Bell numbers leading to

1. code which is actually consistent with the mathematical formulas
1. code which is cleaner and simpler than before
1. a complete error estimate including the final real approximation
1. faster code:

Before:
{{{
sage: timeit('bell_number(200)', number=2000)
2000 loops, best of 3: 1.45 ms per loop
}}}

After:
{{{
sage: timeit('bell_number(200)', number=2000)
2000 loops, best of 3: 441 µs per loop
}}}

URL: http://trac.sagemath.org/17157
Reported by: jdemeyer
Ticket author(s): Jeroen Demeyer
Reviewer(s): Travis Scrimshaw