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
b55e07f4
Kaydet (Commit)
b55e07f4
authored
Eyl 30, 1997
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed up formatting.
üst
1b914b33
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
184 additions
and
114 deletions
+184
-114
libmath.tex
Doc/lib/libmath.tex
+92
-57
libmath.tex
Doc/libmath.tex
+92
-57
No files found.
Doc/lib/libmath.tex
Dosyayı görüntüle @
b55e07f4
...
@@ -7,56 +7,92 @@ This module is always available.
...
@@ -7,56 +7,92 @@ This module is always available.
It provides access to the mathematical functions defined by the C
It provides access to the mathematical functions defined by the C
standard.
standard.
They are:
They are:
\iftexi
\begin{funcdesc}
{
acos
}{
x
}
\begin{funcdesc}
{
acos
}{
x
}
\funcline
{
asin
}{
x
}
Return the arc cosine of
\var
{
x
}
.
\funcline
{
atan
}{
x
}
\end{funcdesc}
\funcline
{
atan2
}{
x, y
}
\funcline
{
ceil
}{
x
}
\begin{funcdesc}
{
asin
}{
x
}
\funcline
{
cos
}{
x
}
Return the arc sine of
\var
{
x
}
.
\funcline
{
cosh
}{
x
}
\end{funcdesc}
\funcline
{
exp
}{
x
}
\funcline
{
fabs
}{
x
}
\begin{funcdesc}
{
atan
}{
x
}
\funcline
{
floor
}{
x
}
Return the arc tangent of
\var
{
x
}
.
\funcline
{
fmod
}{
x, y
}
\end{funcdesc}
\funcline
{
frexp
}{
x
}
\funcline
{
hypot
}{
x, y
}
\begin{funcdesc}
{
atan2
}{
x, y
}
\funcline
{
ldexp
}{
x, y
}
Return
\code
{
atan(x / y)
}
.
\funcline
{
log
}{
x
}
\end{funcdesc}
\funcline
{
log10
}{
x
}
\funcline
{
modf
}{
x
}
\begin{funcdesc}
{
ceil
}{
x
}
\funcline
{
pow
}{
x, y
}
Return the ceiling of
\var
{
x
}
.
\funcline
{
sin
}{
x
}
\end{funcdesc}
\funcline
{
sinh
}{
x
}
\funcline
{
sqrt
}{
x
}
\begin{funcdesc}
{
cos
}{
x
}
\funcline
{
tan
}{
x
}
Return the cosine of
\var
{
x
}
.
\funcline
{
tanh
}{
x
}
\end{funcdesc}
\end{funcdesc}
\else
\begin{funcdesc}
{
cosh
}{
x
}
\code
{
acos(
\varvars
{
x
}
)
}
,
Return the hyperbolic cosine of
\var
{
x
}
.
\code
{
asin(
\varvars
{
x
}
)
}
,
\end{funcdesc}
\code
{
atan(
\varvars
{
x
}
)
}
,
\code
{
atan2(
\varvars
{
x
\,
y
}
)
}
,
\begin{funcdesc}
{
exp
}{
x
}
\code
{
ceil(
\varvars
{
x
}
)
}
,
Return the exponential value
$
\mbox
{
e
}^
x
$
.
\code
{
cos(
\varvars
{
x
}
)
}
,
\end{funcdesc}
\code
{
cosh(
\varvars
{
x
}
)
}
,
\code
{
exp(
\varvars
{
x
}
)
}
,
\begin{funcdesc}
{
fabs
}{
x
}
\code
{
fabs(
\varvars
{
x
}
)
}
,
Return the absolute value of the real
\var
{
x
}
.
\code
{
floor(
\varvars
{
x
}
)
}
,
\end{funcdesc}
\code
{
fmod(
\varvars
{
x
\,
y
}
)
}
,
\code
{
frexp(
\varvars
{
x
}
)
}
,
\begin{funcdesc}
{
floor
}{
x
}
\code
{
hypot(
\varvars
{
x
\,
y
}
)
}
,
Return the floor of
\var
{
x
}
.
\code
{
ldexp(
\varvars
{
x
\,
y
}
)
}
,
\end{funcdesc}
\code
{
log(
\varvars
{
x
}
)
}
,
\code
{
log10(
\varvars
{
x
}
)
}
,
\begin{funcdesc}
{
fmod
}{
x, y
}
\code
{
modf(
\varvars
{
x
}
)
}
,
Return
\code
{
x
\%
y
}
.
\code
{
pow(
\varvars
{
x
\,
y
}
)
}
,
\end{funcdesc}
\code
{
sin(
\varvars
{
x
}
)
}
,
\code
{
sinh(
\varvars
{
x
}
)
}
,
\begin{funcdesc}
{
frexp
}{
x
}
\code
{
sqrt(
\varvars
{
x
}
)
}
,
Return the matissa and exponent for
\var
{
x
}
. The mantissa is
\code
{
tan(
\varvars
{
x
}
)
}
,
positive.
\code
{
tanh(
\varvars
{
x
}
)
}
.
\end{funcdesc}
\fi
\begin{funcdesc}
{
hypot
}{
x, y
}
Return the Euclidean distance,
\code
{
sqrt(x*x + y*y)
}
.
\end{funcdesc}
\begin{funcdesc}
{
ldexp
}{
x, i
}
Return
$
x
{
\times
}
2
^
i
$
.
\end{funcdesc}
\begin{funcdesc}
{
modf
}{
x
}
Return the fractional and integer parts of
\var
{
x
}
. Both results
carry the sign of
\var
{
x
}
.
\end{funcdesc}
\begin{funcdesc}
{
pow
}{
x, y
}
Return
$
x
^
y
$
.
\end{funcdesc}
\begin{funcdesc}
{
sin
}{
x
}
Return the sine of
\var
{
x
}
.
\end{funcdesc}
\begin{funcdesc}
{
sinh
}{
x
}
Return the hyperbolic sine of
\var
{
x
}
.
\end{funcdesc}
\begin{funcdesc}
{
sqrt
}{
x
}
Return the square root of
\var
{
x
}
.
\end{funcdesc}
\begin{funcdesc}
{
tan
}{
x
}
Return the tangent of
\var
{
x
}
.
\end{funcdesc}
\begin{funcdesc}
{
tanh
}{
x
}
Return the hyperbolic tangent of
\var
{
x
}
.
\end{funcdesc}
Note that
\code
{
frexp
}
and
\code
{
modf
}
have a different call/return
Note that
\code
{
frexp
}
and
\code
{
modf
}
have a different call/return
pattern than their C equivalents: they take a single argument and
pattern than their C equivalents: they take a single argument and
...
@@ -64,14 +100,13 @@ return a pair of values, rather than returning their second return
...
@@ -64,14 +100,13 @@ return a pair of values, rather than returning their second return
value through an `output parameter' (there is no such thing in Python).
value through an `output parameter' (there is no such thing in Python).
The module also defines two mathematical constants:
The module also defines two mathematical constants:
\iftexi
\begin{datadesc}
{
pi
}
\begin{datadesc}
{
pi
}
\dataline
{
e
}
The mathematical constant
\emph
{
pi
}
.
\end{datadesc}
\begin{datadesc}
{
e
}
The mathematical constant
\emph
{
e
}
.
\end{datadesc}
\end{datadesc}
\else
\code
{
pi
}
and
\code
{
e
}
.
\fi
\begin{seealso}
See also the
\code
{
cmath
}
versions of many of these functions.
\seealso
{
cmath
}{
versions of these functions that can handle complex numbers
}
\end{seealso}
Doc/libmath.tex
Dosyayı görüntüle @
b55e07f4
...
@@ -7,56 +7,92 @@ This module is always available.
...
@@ -7,56 +7,92 @@ This module is always available.
It provides access to the mathematical functions defined by the C
It provides access to the mathematical functions defined by the C
standard.
standard.
They are:
They are:
\iftexi
\begin{funcdesc}
{
acos
}{
x
}
\begin{funcdesc}
{
acos
}{
x
}
\funcline
{
asin
}{
x
}
Return the arc cosine of
\var
{
x
}
.
\funcline
{
atan
}{
x
}
\end{funcdesc}
\funcline
{
atan2
}{
x, y
}
\funcline
{
ceil
}{
x
}
\begin{funcdesc}
{
asin
}{
x
}
\funcline
{
cos
}{
x
}
Return the arc sine of
\var
{
x
}
.
\funcline
{
cosh
}{
x
}
\end{funcdesc}
\funcline
{
exp
}{
x
}
\funcline
{
fabs
}{
x
}
\begin{funcdesc}
{
atan
}{
x
}
\funcline
{
floor
}{
x
}
Return the arc tangent of
\var
{
x
}
.
\funcline
{
fmod
}{
x, y
}
\end{funcdesc}
\funcline
{
frexp
}{
x
}
\funcline
{
hypot
}{
x, y
}
\begin{funcdesc}
{
atan2
}{
x, y
}
\funcline
{
ldexp
}{
x, y
}
Return
\code
{
atan(x / y)
}
.
\funcline
{
log
}{
x
}
\end{funcdesc}
\funcline
{
log10
}{
x
}
\funcline
{
modf
}{
x
}
\begin{funcdesc}
{
ceil
}{
x
}
\funcline
{
pow
}{
x, y
}
Return the ceiling of
\var
{
x
}
.
\funcline
{
sin
}{
x
}
\end{funcdesc}
\funcline
{
sinh
}{
x
}
\funcline
{
sqrt
}{
x
}
\begin{funcdesc}
{
cos
}{
x
}
\funcline
{
tan
}{
x
}
Return the cosine of
\var
{
x
}
.
\funcline
{
tanh
}{
x
}
\end{funcdesc}
\end{funcdesc}
\else
\begin{funcdesc}
{
cosh
}{
x
}
\code
{
acos(
\varvars
{
x
}
)
}
,
Return the hyperbolic cosine of
\var
{
x
}
.
\code
{
asin(
\varvars
{
x
}
)
}
,
\end{funcdesc}
\code
{
atan(
\varvars
{
x
}
)
}
,
\code
{
atan2(
\varvars
{
x
\,
y
}
)
}
,
\begin{funcdesc}
{
exp
}{
x
}
\code
{
ceil(
\varvars
{
x
}
)
}
,
Return the exponential value
$
\mbox
{
e
}^
x
$
.
\code
{
cos(
\varvars
{
x
}
)
}
,
\end{funcdesc}
\code
{
cosh(
\varvars
{
x
}
)
}
,
\code
{
exp(
\varvars
{
x
}
)
}
,
\begin{funcdesc}
{
fabs
}{
x
}
\code
{
fabs(
\varvars
{
x
}
)
}
,
Return the absolute value of the real
\var
{
x
}
.
\code
{
floor(
\varvars
{
x
}
)
}
,
\end{funcdesc}
\code
{
fmod(
\varvars
{
x
\,
y
}
)
}
,
\code
{
frexp(
\varvars
{
x
}
)
}
,
\begin{funcdesc}
{
floor
}{
x
}
\code
{
hypot(
\varvars
{
x
\,
y
}
)
}
,
Return the floor of
\var
{
x
}
.
\code
{
ldexp(
\varvars
{
x
\,
y
}
)
}
,
\end{funcdesc}
\code
{
log(
\varvars
{
x
}
)
}
,
\code
{
log10(
\varvars
{
x
}
)
}
,
\begin{funcdesc}
{
fmod
}{
x, y
}
\code
{
modf(
\varvars
{
x
}
)
}
,
Return
\code
{
x
\%
y
}
.
\code
{
pow(
\varvars
{
x
\,
y
}
)
}
,
\end{funcdesc}
\code
{
sin(
\varvars
{
x
}
)
}
,
\code
{
sinh(
\varvars
{
x
}
)
}
,
\begin{funcdesc}
{
frexp
}{
x
}
\code
{
sqrt(
\varvars
{
x
}
)
}
,
Return the matissa and exponent for
\var
{
x
}
. The mantissa is
\code
{
tan(
\varvars
{
x
}
)
}
,
positive.
\code
{
tanh(
\varvars
{
x
}
)
}
.
\end{funcdesc}
\fi
\begin{funcdesc}
{
hypot
}{
x, y
}
Return the Euclidean distance,
\code
{
sqrt(x*x + y*y)
}
.
\end{funcdesc}
\begin{funcdesc}
{
ldexp
}{
x, i
}
Return
$
x
{
\times
}
2
^
i
$
.
\end{funcdesc}
\begin{funcdesc}
{
modf
}{
x
}
Return the fractional and integer parts of
\var
{
x
}
. Both results
carry the sign of
\var
{
x
}
.
\end{funcdesc}
\begin{funcdesc}
{
pow
}{
x, y
}
Return
$
x
^
y
$
.
\end{funcdesc}
\begin{funcdesc}
{
sin
}{
x
}
Return the sine of
\var
{
x
}
.
\end{funcdesc}
\begin{funcdesc}
{
sinh
}{
x
}
Return the hyperbolic sine of
\var
{
x
}
.
\end{funcdesc}
\begin{funcdesc}
{
sqrt
}{
x
}
Return the square root of
\var
{
x
}
.
\end{funcdesc}
\begin{funcdesc}
{
tan
}{
x
}
Return the tangent of
\var
{
x
}
.
\end{funcdesc}
\begin{funcdesc}
{
tanh
}{
x
}
Return the hyperbolic tangent of
\var
{
x
}
.
\end{funcdesc}
Note that
\code
{
frexp
}
and
\code
{
modf
}
have a different call/return
Note that
\code
{
frexp
}
and
\code
{
modf
}
have a different call/return
pattern than their C equivalents: they take a single argument and
pattern than their C equivalents: they take a single argument and
...
@@ -64,14 +100,13 @@ return a pair of values, rather than returning their second return
...
@@ -64,14 +100,13 @@ return a pair of values, rather than returning their second return
value through an `output parameter' (there is no such thing in Python).
value through an `output parameter' (there is no such thing in Python).
The module also defines two mathematical constants:
The module also defines two mathematical constants:
\iftexi
\begin{datadesc}
{
pi
}
\begin{datadesc}
{
pi
}
\dataline
{
e
}
The mathematical constant
\emph
{
pi
}
.
\end{datadesc}
\begin{datadesc}
{
e
}
The mathematical constant
\emph
{
e
}
.
\end{datadesc}
\end{datadesc}
\else
\code
{
pi
}
and
\code
{
e
}
.
\fi
\begin{seealso}
See also the
\code
{
cmath
}
versions of many of these functions.
\seealso
{
cmath
}{
versions of these functions that can handle complex numbers
}
\end{seealso}
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