diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/math.rst | 7 | ||||
-rw-r--r-- | Doc/whatsnew/3.3.rst | 45 |
2 files changed, 36 insertions, 16 deletions
diff --git a/Doc/library/math.rst b/Doc/library/math.rst index 98c5b33..8254d3f 100644 --- a/Doc/library/math.rst +++ b/Doc/library/math.rst @@ -184,6 +184,13 @@ Power and logarithmic functions result is calculated in a way which is accurate for *x* near zero. +.. function:: log2(x) + + Return the base-2 logarithm of *x*. + + .. versionadded:: 3.3 + + .. function:: log10(x) Return the base-10 logarithm of *x*. This is usually more accurate diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst index 37f96ce..e657af2 100644 --- a/Doc/whatsnew/3.3.rst +++ b/Doc/whatsnew/3.3.rst @@ -76,25 +76,15 @@ New module: :mod:`faulthandler`. * :envvar:`PYTHONFAULTHANDLER` * :option:`-X` ``faulthandler`` -os --- -* The :mod:`os` module has a new :func:`~os.sendfile` function which provides - an efficent "zero-copy" way for copying data from one file (or socket) - descriptor to another. The phrase "zero-copy" refers to the fact that all of - the copying of data between the two descriptors is done entirely by the - kernel, with no copying of data into userspace buffers. :func:`~os.sendfile` - can be used to efficiently copy data from a file on disk to a network socket, - e.g. for downloading a file. +math +---- - (Patch submitted by Ross Lagerwall and Giampaolo Rodolà in :issue:`10882`.) +The :mod:`math` module has a new function: -* The :mod:`os` module has two new functions: :func:`~os.getpriority` and - :func:`~os.setpriority`. They can be used to get or set process - niceness/priority in a fashion similar to :func:`os.nice` but extended to all - processes instead of just the current one. + * :func:`~math.log2`: return the base-2 logarithm of *x* + (Written by Mark Dickinson in :issue:`11888`). - (Patch submitted by Giampaolo Rodolà in :issue:`10784`.) nntplib ------- @@ -112,6 +102,28 @@ connection when done:: (Contributed by Giampaolo Rodolà in :issue:`9795`) + +os +-- + +* The :mod:`os` module has a new :func:`~os.sendfile` function which provides + an efficent "zero-copy" way for copying data from one file (or socket) + descriptor to another. The phrase "zero-copy" refers to the fact that all of + the copying of data between the two descriptors is done entirely by the + kernel, with no copying of data into userspace buffers. :func:`~os.sendfile` + can be used to efficiently copy data from a file on disk to a network socket, + e.g. for downloading a file. + + (Patch submitted by Ross Lagerwall and Giampaolo Rodolà in :issue:`10882`.) + +* The :mod:`os` module has two new functions: :func:`~os.getpriority` and + :func:`~os.setpriority`. They can be used to get or set process + niceness/priority in a fashion similar to :func:`os.nice` but extended to all + processes instead of just the current one. + + (Patch submitted by Giampaolo Rodolà in :issue:`10784`.) + + sys --- @@ -120,10 +132,11 @@ sys (:issue:`11223`) + signal ------ -* The :mod:`signal` module has a new functions: +* The :mod:`signal` module has new functions: * :func:`~signal.pthread_sigmask`: fetch and/or change the signal mask of the calling thread (Contributed by Jean-Paul Calderone in :issue:`8407`) ; |