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
97c9208c
Kaydet (Commit)
97c9208c
authored
Tem 09, 2004
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Incorporate Facundo's suggestions.
üst
9499658b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
libdecimal.tex
Doc/lib/libdecimal.tex
+11
-6
No files found.
Doc/lib/libdecimal.tex
Dosyayı görüntüle @
97c9208c
...
...
@@ -15,7 +15,7 @@ Specification.}
\versionadded
{
2.4
}
The
decimal
\module
{
module
}
provides support for decimal floating point
The
\module
{
decimal
}
module
provides support for decimal floating point
arithmetic. It offers several advantages over the
\class
{
float()
}
datatype:
\begin{itemize}
...
...
@@ -89,7 +89,8 @@ the decimal module are: \constant{Clamped}, \constant{InvalidOperation},
For each signal there is a flag and a trap enabler. When a signal is
encountered, its flag incremented from zero and, then, if the trap enabler
is set to one, an exception is raised.
is set to one, an exception is raised. Flags are sticky, so the user
needs to reset them before monitoring a calculation.
\begin{seealso}
...
...
@@ -504,10 +505,14 @@ with the \class{Context} constructor.
The
\var
{
prec
}
field is a positive integer that sets the precision for
arithmetic operations in the context.
The
\var
{
rounding
}
option is one of:
\constant
{
ROUND
_
CEILING
}
,
\constant
{
ROUND
_
DOWN
}
,
\constant
{
ROUND
_
FLOOR
}
,
\constant
{
ROUND
_
HALF
_
DOWN
}
(towards zero),
\constant
{
ROUND
_
HALF
_
EVEN
}
,
\constant
{
ROUND
_
HALF
_
UP
}
, or
\constant
{
ROUND
_
UP
}
(away from zero).
The
\var
{
rounding
}
option is one of:
\constant
{
ROUND
_
CEILING
}
(towards
\constant
{
Infinity
}
),
\constant
{
ROUND
_
DOWN
}
(towards zero),
\constant
{
ROUND
_
FLOOR
}
(towards
\constant
{
-Infinity
}
),
\constant
{
ROUND
_
HALF
_
DOWN
}
(towards zero),
\constant
{
ROUND
_
HALF
_
EVEN
}
,
\constant
{
ROUND
_
HALF
_
UP
}
(away from zero), or
\constant
{
ROUND
_
UP
}
(away from zero).
The
\var
{
trap
_
enablers
}
and
\var
{
flags
}
fields are mappings from signals
to either
\constant
{
0
}
or
\constant
{
1
}
.
...
...
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