Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
a4cfb429
Kaydet (Commit)
a4cfb429
authored
Ock 25, 2011
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add entry for the math module.
üst
ad81f2be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
3.2.rst
Doc/whatsnew/3.2.rst
+39
-0
No files found.
Doc/whatsnew/3.2.rst
Dosyayı görüntüle @
a4cfb429
...
...
@@ -972,6 +972,45 @@ datetime and time
(Contributed by Alexander Belopolsky and Victor Stinner.)
math
----
The :mod:`math` module has been updated with five new functions inspired by the
C99 standard.
The :func:`~math.isfinite` function provides a reliable and fast way to detect
special values. It returns *True* for regular numbers and *False* for *Nan* or
*Infinity*:
>>> [isfinite(x) for x in (123, 4.56, float('Nan'), float('Inf'))]
[True, True, False, False]
The :func:`~math.expm1` function computes ``e**x-1`` for small values of *x*
without incuring the loss of precision that usually accompanies the subtraction
of nearly equal quantities:
>>> expm1(0.013671875) # more accurate way to compute e**x-1 for a small x
0.013765762467652909
The :func:`~math.erf` function computes a probability integral of `Gaussian
error function <http://en.wikipedia.org/wiki/Error_function>`_:
>>> erf(1.0/sqrt(2.0)) # portion of normal distribution within 1 standard deviation
0.682689492137086
:func:`~math.gamma` is a continuous extension of the factorial function. See
http://en.wikipedia.org/wiki/Gamma_function for details. Because the function
is related to factorials, it grows large even for small values of *x*, so there
is also a :func:`~math.lgamma` for computing the natural logarithm of the gamma
function:
>>> gamma(7.0) # six factorial
720.0
>>> lgamma(801.0) # log(800 factorial)
4551.950730698041
(Contributed by Mark Dickinson.)
abc
---
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment