fuzzies et traduction de decimal.po - 2/2
Some checks failed
ci/woodpecker/pr/woodpecker Pipeline failed

This commit is contained in:
Christophe Nanteuil 2023-12-07 23:03:35 +01:00
parent d5e2f003e5
commit 6e5243e0f5
2 changed files with 254 additions and 22 deletions

1
dict
View File

@ -105,6 +105,7 @@ journalisé
journalisée journalisée
journalisés journalisés
jr. jr.
Knuth
kolams kolams
kuchling kuchling
l'allocateur l'allocateur

View File

@ -6,7 +6,7 @@ msgstr ""
"Project-Id-Version: Python 3\n" "Project-Id-Version: Python 3\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-07-23 14:38+0200\n" "POT-Creation-Date: 2023-07-23 14:38+0200\n"
"PO-Revision-Date: 2023-05-20 20:21+0200\n" "PO-Revision-Date: 2023-12-07 22:56+0100\n"
"Last-Translator: Christophe Nanteuil <christophe.nanteuil@gmail.com>\n" "Last-Translator: Christophe Nanteuil <christophe.nanteuil@gmail.com>\n"
"Language-Team: FRENCH <traductions@lists.afpy.org>\n" "Language-Team: FRENCH <traductions@lists.afpy.org>\n"
"Language: fr\n" "Language: fr\n"
@ -1985,8 +1985,8 @@ msgstr "``-1999999999999999997``"
msgid "" msgid ""
"The value is ``True``. Deprecated, because Python now always has threads." "The value is ``True``. Deprecated, because Python now always has threads."
msgstr "" msgstr ""
"La valeur est ``True``. Déprécié, parce que maintenant Python possède " "La valeur est ``True``. C'est obsolète, car maintenant Python gère toujours "
"toujours des fils d'exécution." "les fils d'exécution."
#: library/decimal.rst:1515 #: library/decimal.rst:1515
msgid "" msgid ""
@ -1996,10 +1996,16 @@ msgid ""
"value is ``False``. This is slightly faster in some nested context " "value is ``False``. This is slightly faster in some nested context "
"scenarios." "scenarios."
msgstr "" msgstr ""
"La valeur par défaut est ``True``. Si Python est :option:`configuré à l'aide "
"de l'option --without-decimal-contextvar <--without-decimal-contextvar>`, la "
"version C utilise un contexte particulier au fil d'exécution plutôt qu'un "
"contexte particulier à la coroutine et la valeur est ``False``. Ceci est "
"légèrement plus rapide dans certains scénarios où les contextes sont "
"imbriqués."
#: library/decimal.rst:1520 #: library/decimal.rst:1520
msgid "backported to 3.7 and 3.8." msgid "backported to 3.7 and 3.8."
msgstr "" msgstr "rétro-porté vers 3.7 et 3.8."
#: library/decimal.rst:1524 #: library/decimal.rst:1524
msgid "Rounding modes" msgid "Rounding modes"
@ -2007,37 +2013,41 @@ msgstr "Modes d'arrondi"
#: library/decimal.rst:1528 #: library/decimal.rst:1528
msgid "Round towards ``Infinity``." msgid "Round towards ``Infinity``."
msgstr "" msgstr "Arrondit vers ``Infinity``."
#: library/decimal.rst:1532 #: library/decimal.rst:1532
msgid "Round towards zero." msgid "Round towards zero."
msgstr "" msgstr "Arrondit vers zéro."
#: library/decimal.rst:1536 #: library/decimal.rst:1536
msgid "Round towards ``-Infinity``." msgid "Round towards ``-Infinity``."
msgstr "" msgstr "Arrondit vers ``-Infinity``."
#: library/decimal.rst:1540 #: library/decimal.rst:1540
msgid "Round to nearest with ties going towards zero." msgid "Round to nearest with ties going towards zero."
msgstr "" msgstr "Arrondit au plus proche, en allant vers zéro si l'on est au milieu."
#: library/decimal.rst:1544 #: library/decimal.rst:1544
msgid "Round to nearest with ties going to nearest even integer." msgid "Round to nearest with ties going to nearest even integer."
msgstr "" msgstr ""
"Arrondit au plus proche, en allant à l'entier pair le plus proche si l'on "
"est au milieu."
#: library/decimal.rst:1548 #: library/decimal.rst:1548
msgid "Round to nearest with ties going away from zero." msgid "Round to nearest with ties going away from zero."
msgstr "" msgstr "Arrondit au plus proche, en s'éloignant de zéro si l'on est au milieu."
#: library/decimal.rst:1552 #: library/decimal.rst:1552
msgid "Round away from zero." msgid "Round away from zero."
msgstr "" msgstr "Arrondit en s'éloignant de zéro."
#: library/decimal.rst:1556 #: library/decimal.rst:1556
msgid "" msgid ""
"Round away from zero if last digit after rounding towards zero would have " "Round away from zero if last digit after rounding towards zero would have "
"been 0 or 5; otherwise round towards zero." "been 0 or 5; otherwise round towards zero."
msgstr "" msgstr ""
"Arrondit en s'éloignant de zéro si le dernier chiffre après l'arrondi vers "
"zéro aurait été 0 ou 5 ; sinon arrondit en se rapprochant de zéro."
#: library/decimal.rst:1563 #: library/decimal.rst:1563
msgid "Signals" msgid "Signals"
@ -2048,6 +2058,9 @@ msgid ""
"Signals represent conditions that arise during computation. Each corresponds " "Signals represent conditions that arise during computation. Each corresponds "
"to one context flag and one context trap enabler." "to one context flag and one context trap enabler."
msgstr "" msgstr ""
"Les signaux représentent les conditions qui surviennent pendant le calcul. "
"Chacun correspond à un indicateur de contexte et à un activateur de "
"surveillance contextuel."
#: library/decimal.rst:1568 #: library/decimal.rst:1568
msgid "" msgid ""
@ -2056,6 +2069,11 @@ msgid ""
"to determine whether a computation was exact). After checking the flags, be " "to determine whether a computation was exact). After checking the flags, be "
"sure to clear all flags before starting the next computation." "sure to clear all flags before starting the next computation."
msgstr "" msgstr ""
"L'indicateur de contexte est levé chaque fois que la condition est "
"rencontrée. Après le calcul, les indicateurs peuvent être vérifiés à des "
"fins d'information (par exemple, pour déterminer si un calcul était exact). "
"Après avoir vérifié les indicateurs, assurez-vous de tous les effacer avant "
"de commencer le calcul suivant."
#: library/decimal.rst:1573 #: library/decimal.rst:1573
msgid "" msgid ""
@ -2064,10 +2082,16 @@ msgid ""
"`DivisionByZero` trap is set, then a :exc:`DivisionByZero` exception is " "`DivisionByZero` trap is set, then a :exc:`DivisionByZero` exception is "
"raised upon encountering the condition." "raised upon encountering the condition."
msgstr "" msgstr ""
"Si l'activateur de surveillance contextuel est défini pour le signal, la "
"condition provoque le déclenchement d'une exception Python. Par exemple, si "
"l'activateur de surveillance de :class:`DivisionByZero` est défini, alors "
"une exception :exc:`DivisionByZero` est levée lors de la rencontre de la "
"condition."
#: library/decimal.rst:1581 #: library/decimal.rst:1581
msgid "Altered an exponent to fit representation constraints." msgid "Altered an exponent to fit representation constraints."
msgstr "" msgstr ""
"Modification d'un exposant pour l'adapter aux contraintes de représentation."
#: library/decimal.rst:1583 #: library/decimal.rst:1583
msgid "" msgid ""
@ -2075,14 +2099,20 @@ msgid ""
"attr:`~Context.Emin` and :attr:`~Context.Emax` limits. If possible, the " "attr:`~Context.Emin` and :attr:`~Context.Emax` limits. If possible, the "
"exponent is reduced to fit by adding zeros to the coefficient." "exponent is reduced to fit by adding zeros to the coefficient."
msgstr "" msgstr ""
"En règle générale, cela se produit lorsqu'un exposant se situe en dehors des "
"limites :attr:`~Context.Emin` et :attr:`~Context.Emax` du contexte. Si "
"possible, l'exposant est réduit pour s'adapter en ajoutant des zéros à la "
"mantisse."
#: library/decimal.rst:1590 #: library/decimal.rst:1590
msgid "Base class for other signals and a subclass of :exc:`ArithmeticError`." msgid "Base class for other signals and a subclass of :exc:`ArithmeticError`."
msgstr "" msgstr ""
"Classe mère pour d'autres signaux et une sous-classe de :exc:"
"`ArithmeticError`."
#: library/decimal.rst:1595 #: library/decimal.rst:1595
msgid "Signals the division of a non-infinite number by zero." msgid "Signals the division of a non-infinite number by zero."
msgstr "" msgstr "Signale la division d'un nombre non infini par zéro."
#: library/decimal.rst:1597 #: library/decimal.rst:1597
msgid "" msgid ""
@ -2090,10 +2120,14 @@ msgid ""
"negative power. If this signal is not trapped, returns ``Infinity`` or ``-" "negative power. If this signal is not trapped, returns ``Infinity`` or ``-"
"Infinity`` with the sign determined by the inputs to the calculation." "Infinity`` with the sign determined by the inputs to the calculation."
msgstr "" msgstr ""
"Peut se produire lors dune division, dune division modulo ou lors de "
"lélévation dun nombre à une puissance négative. Si ce signal n'est pas "
"surveillé, renvoie ``Infinity`` ou ``-Infinity`` avec le signe déterminé par "
"les entrées du calcul."
#: library/decimal.rst:1604 #: library/decimal.rst:1604
msgid "Indicates that rounding occurred and the result is not exact." msgid "Indicates that rounding occurred and the result is not exact."
msgstr "" msgstr "Indique qu'un arrondi a eu lieu et que le résultat n'est pas exact."
#: library/decimal.rst:1606 #: library/decimal.rst:1606
msgid "" msgid ""
@ -2101,16 +2135,22 @@ msgid ""
"result is returned. The signal flag or trap is used to detect when results " "result is returned. The signal flag or trap is used to detect when results "
"are inexact." "are inexact."
msgstr "" msgstr ""
"Se produit lorsque des chiffres non nuls ont été supprimés lors de "
"l'arrondi. Le résultat arrondi est renvoyé. Le drapeau de signalisation ou "
"de surveillance est utilisé pour détecter lorsque les résultats sont "
"inexacts."
#: library/decimal.rst:1613 #: library/decimal.rst:1613
msgid "An invalid operation was performed." msgid "An invalid operation was performed."
msgstr "" msgstr "Une opération non valide a été effectuée."
#: library/decimal.rst:1615 #: library/decimal.rst:1615
msgid "" msgid ""
"Indicates that an operation was requested that does not make sense. If not " "Indicates that an operation was requested that does not make sense. If not "
"trapped, returns ``NaN``. Possible causes include::" "trapped, returns ``NaN``. Possible causes include::"
msgstr "" msgstr ""
"Indique qu'une opération demandée n'a aucun sens. S'il n'est pas surveillé, "
"renvoie ``NaN``. Les causes possibles incluent ::"
#: library/decimal.rst:1631 #: library/decimal.rst:1631
msgid "Numerical overflow." msgid "Numerical overflow."
@ -2124,10 +2164,17 @@ msgid ""
"outward to ``Infinity``. In either case, :class:`Inexact` and :class:" "outward to ``Infinity``. In either case, :class:`Inexact` and :class:"
"`Rounded` are also signaled." "`Rounded` are also signaled."
msgstr "" msgstr ""
"Indique que l'exposant est supérieur à :attr:`Context.Emax` après l'arrondi. "
"S'il n'est pas surveillé, le résultat dépend du mode d'arrondi, soit en "
"tirant vers l'intérieur jusqu'au plus grand nombre fini représentable, soit "
"en arrondissant vers l'extérieur à ``Infinity``. Dans les deux cas, :class:"
"`Inexact` et :class:`Rounded` sont également signalés."
#: library/decimal.rst:1642 #: library/decimal.rst:1642
msgid "Rounding occurred though possibly no information was lost." msgid "Rounding occurred though possibly no information was lost."
msgstr "" msgstr ""
"Des arrondis ont eu lieu, même s'il est possible qu'aucune information n'ait "
"été perdue."
#: library/decimal.rst:1644 #: library/decimal.rst:1644
msgid "" msgid ""
@ -2135,30 +2182,41 @@ msgid ""
"(such as rounding ``5.00`` to ``5.0``). If not trapped, returns the result " "(such as rounding ``5.00`` to ``5.0``). If not trapped, returns the result "
"unchanged. This signal is used to detect loss of significant digits." "unchanged. This signal is used to detect loss of significant digits."
msgstr "" msgstr ""
"Signalé chaque fois que l'arrondi supprime des chiffres ; même si ces "
"chiffres sont nuls (par exemple en arrondissant ``5.00`` à ``5.0``). S'il "
"n'est pas surveillé, renvoie le résultat inchangé. Ce signal est utilisé "
"pour détecter la perte de chiffres significatifs."
#: library/decimal.rst:1652 #: library/decimal.rst:1652
msgid "Exponent was lower than :attr:`~Context.Emin` prior to rounding." msgid "Exponent was lower than :attr:`~Context.Emin` prior to rounding."
msgstr "" msgstr "L'exposant était inférieur à :attr:`~Context.Emin` avant l'arrondi."
#: library/decimal.rst:1654 #: library/decimal.rst:1654
msgid "" msgid ""
"Occurs when an operation result is subnormal (the exponent is too small). If " "Occurs when an operation result is subnormal (the exponent is too small). If "
"not trapped, returns the result unchanged." "not trapped, returns the result unchanged."
msgstr "" msgstr ""
"Se produit lorsque le résultat d'une opération est inférieur à la normale "
"(l'exposant est trop petit). S'il n'est pas surveillé, renvoie le résultat "
"inchangé."
#: library/decimal.rst:1660 #: library/decimal.rst:1660
msgid "Numerical underflow with result rounded to zero." msgid "Numerical underflow with result rounded to zero."
msgstr "" msgstr "Sous-dépassement numérique avec résultat arrondi à zéro."
#: library/decimal.rst:1662 #: library/decimal.rst:1662
msgid "" msgid ""
"Occurs when a subnormal result is pushed to zero by rounding. :class:" "Occurs when a subnormal result is pushed to zero by rounding. :class:"
"`Inexact` and :class:`Subnormal` are also signaled." "`Inexact` and :class:`Subnormal` are also signaled."
msgstr "" msgstr ""
"Se produit lorsqu'un résultat anormal est ramené à zéro par arrondi. :class:"
"`Inexact` et :class:`Subnormal` sont également signalés."
#: library/decimal.rst:1668 #: library/decimal.rst:1668
msgid "Enable stricter semantics for mixing floats and Decimals." msgid "Enable stricter semantics for mixing floats and Decimals."
msgstr "" msgstr ""
"Active une sémantique plus stricte pour mélanger les flottants et les "
"décimaux."
#: library/decimal.rst:1670 #: library/decimal.rst:1670
msgid "" msgid ""
@ -2170,6 +2228,14 @@ msgid ""
"conversions with :meth:`~decimal.Decimal.from_float` or :meth:`~decimal." "conversions with :meth:`~decimal.Decimal.from_float` or :meth:`~decimal."
"Context.create_decimal_from_float` do not set the flag." "Context.create_decimal_from_float` do not set the flag."
msgstr "" msgstr ""
"Si le signal n'est pas surveillé (par défaut), le mélange de flottants et de "
"décimaux est autorisé dans le constructeur :class:`~decimal.Decimal`, :meth:"
"`~decimal.Context.create_decimal` et tous les opérateurs de comparaison. La "
"conversion et les comparaisons sont exactes. Toute occurrence d'une "
"opération mixte est enregistrée silencieusement en levant :exc:"
"`FloatOperation` dans les indicateurs de contexte. Les conversions "
"explicites avec :meth:`~decimal.Decimal.from_float` ou :meth:`~decimal."
"Context.create_decimal_from_float` ne lèvent pas l'indicateur."
#: library/decimal.rst:1678 #: library/decimal.rst:1678
msgid "" msgid ""
@ -2177,18 +2243,21 @@ msgid ""
"conversions are silent. All other mixed operations raise :exc:" "conversions are silent. All other mixed operations raise :exc:"
"`FloatOperation`." "`FloatOperation`."
msgstr "" msgstr ""
"Sinon (le signal est surveillé), seules les comparaisons d'égalité et les "
"conversions explicites sont silencieuses. Toutes les autres opérations "
"mixtes lèvent :exc:`FloatOperation`."
#: library/decimal.rst:1682 #: library/decimal.rst:1682
msgid "The following table summarizes the hierarchy of signals::" msgid "The following table summarizes the hierarchy of signals::"
msgstr "" msgstr "Le tableau suivant résume la hiérarchie des signaux ::"
#: library/decimal.rst:1703 #: library/decimal.rst:1703
msgid "Floating Point Notes" msgid "Floating Point Notes"
msgstr "" msgstr "Notes pour les nombres à virgule flottante"
#: library/decimal.rst:1707 #: library/decimal.rst:1707
msgid "Mitigating round-off error with increased precision" msgid "Mitigating round-off error with increased precision"
msgstr "" msgstr "Atténuation des erreurs d'arrondi avec une précision accrue"
#: library/decimal.rst:1709 #: library/decimal.rst:1709
msgid "" msgid ""
@ -2197,6 +2266,10 @@ msgid ""
"can still incur round-off error when non-zero digits exceed the fixed " "can still incur round-off error when non-zero digits exceed the fixed "
"precision." "precision."
msgstr "" msgstr ""
"L'utilisation de la virgule flottante décimale élimine l'erreur de "
"représentation décimale (ce qui permet de représenter ``0.1`` exactement) ; "
"cependant, certaines opérations peuvent toujours entraîner une erreur "
"d'arrondi lorsque des chiffres non nuls dépassent la précision fixée."
#: library/decimal.rst:1713 #: library/decimal.rst:1713
msgid "" msgid ""
@ -2206,16 +2279,24 @@ msgid ""
"floating point arithmetic with insufficient precision causes the breakdown " "floating point arithmetic with insufficient precision causes the breakdown "
"of the associative and distributive properties of addition:" "of the associative and distributive properties of addition:"
msgstr "" msgstr ""
"Les effets de lerreur darrondi peuvent être amplifiés par lajout ou la "
"soustraction de quantités proches de la limite d'arrondi, entraînant une "
"perte de précision. Knuth fournit deux exemples instructifs où "
"l'arithmétique à virgule flottante arrondie avec une précision insuffisante "
"provoque la rupture des propriétés associatives et distributives de "
"l'addition :"
#: library/decimal.rst:1737 #: library/decimal.rst:1737
msgid "" msgid ""
"The :mod:`decimal` module makes it possible to restore the identities by " "The :mod:`decimal` module makes it possible to restore the identities by "
"expanding the precision sufficiently to avoid loss of significance:" "expanding the precision sufficiently to avoid loss of significance:"
msgstr "" msgstr ""
"Le module :mod:`decimal` permet de rétablir les identités en étendant "
"suffisamment la précision pour éviter la perte de précision :"
#: library/decimal.rst:1757 #: library/decimal.rst:1757
msgid "Special values" msgid "Special values"
msgstr "" msgstr "Valeurs spéciales"
#: library/decimal.rst:1759 #: library/decimal.rst:1759
msgid "" msgid ""
@ -2223,6 +2304,9 @@ msgid ""
"including ``NaN``, ``sNaN``, ``-Infinity``, ``Infinity``, and two zeros, " "including ``NaN``, ``sNaN``, ``-Infinity``, ``Infinity``, and two zeros, "
"``+0`` and ``-0``." "``+0`` and ``-0``."
msgstr "" msgstr ""
"La représentation des nombres du module :mod:`decimal` fournit des valeurs "
"spéciales, notamment ``NaN``, ``sNaN``, ``-Infinity``, ``Infinity`` et deux "
"zéros, ``+0` ` et ``-0``."
#: library/decimal.rst:1763 #: library/decimal.rst:1763
msgid "" msgid ""
@ -2232,6 +2316,11 @@ msgid ""
"infinity can result from rounding beyond the limits of the largest " "infinity can result from rounding beyond the limits of the largest "
"representable number." "representable number."
msgstr "" msgstr ""
"Les infinis peuvent être construits directement avec "
"``Decimal('Infinity')``. En outre, ils peuvent résulter d'une division par "
"zéro lorsque le signal :exc:`DivisionByZero` n'est pas surveillé. De même, "
"lorsque le signal :exc:`Overflow` n'est pas surveillé, l'infini peut "
"résulter d'un arrondi au-delà des limites du plus grand nombre représentable."
#: library/decimal.rst:1768 #: library/decimal.rst:1768
msgid "" msgid ""
@ -2239,6 +2328,10 @@ msgid ""
"where they get treated as very large, indeterminate numbers. For instance, " "where they get treated as very large, indeterminate numbers. For instance, "
"adding a constant to infinity gives another infinite result." "adding a constant to infinity gives another infinite result."
msgstr "" msgstr ""
"Les infinis sont signés (raffinés) et peuvent être utilisés dans des "
"opérations arithmétiques où ils sont traités comme de très grands nombres "
"indéterminés. Par exemple, ajouter une constante à linfini donne un autre "
"résultat infini."
#: library/decimal.rst:1772 #: library/decimal.rst:1772
msgid "" msgid ""
@ -2250,6 +2343,14 @@ msgid ""
"series of computations that occasionally have missing inputs --- it allows " "series of computations that occasionally have missing inputs --- it allows "
"the calculation to proceed while flagging specific results as invalid." "the calculation to proceed while flagging specific results as invalid."
msgstr "" msgstr ""
"Certaines opérations sont indéterminées et renvoient ``NaN`` ou, si le "
"signal :exc:`InvalidOperation` est surveillé, déclenchent une exception. Par "
"exemple, ``0/0`` renvoie ``NaN`` qui signifie « pas un nombre » (*not a "
"number* en anglais). Cette espèce de ``NaN`` est silencieuse et, une fois "
"créée, elle peut intervenir dans d'autres calculs, aboutissant toujours à un "
"autre ``NaN``. Ce comportement peut être utile pour une série de calculs qui "
"comportent parfois des entrées manquantes : il permet au calcul de se "
"poursuivre tout en indiquant que les résultats ne sont pas valides."
#: library/decimal.rst:1780 #: library/decimal.rst:1780
msgid "" msgid ""
@ -2257,6 +2358,10 @@ msgid ""
"operation. This is a useful return value when an invalid result needs to " "operation. This is a useful return value when an invalid result needs to "
"interrupt a calculation for special handling." "interrupt a calculation for special handling."
msgstr "" msgstr ""
"Une variante est ``sNaN`` qui lève un signal plutôt que de rester silencieux "
"après chaque opération. Il s'agit d'une valeur de retour utile lorsqu'un "
"résultat non valide doit interrompre un calcul pour effectuer un traitement "
"spécial."
#: library/decimal.rst:1784 #: library/decimal.rst:1784
msgid "" msgid ""
@ -2274,6 +2379,20 @@ msgid ""
"standards-compliance, use the :meth:`~Decimal.compare` and :meth:`~Decimal." "standards-compliance, use the :meth:`~Decimal.compare` and :meth:`~Decimal."
"compare_signal` methods instead." "compare_signal` methods instead."
msgstr "" msgstr ""
"Le comportement des opérateurs de comparaison de Python peut être un peu "
"surprenant lorsqu'un ``NaN`` est impliqué. Un test d'égalité où l'un des "
"opérandes est un ``NaN`` silencieux ou de signalisation renvoie toujours :"
"const:`False` (même en faisant ``Decimal('NaN')==Decimal('NaN')``) , tandis "
"qu'un test d'inégalité renvoie toujours :const:`True`. Une tentative de "
"comparaison de deux *Decimals* en utilisant l'un des opérateurs ``<``, "
"``<=``, ``>`` ou ``>=`` lève une :exc:`InvalidOperation` si l'un ou l'autre "
"des opérandes est un ``NaN``, et renvoie :const:`False` si ce signal n'est "
"pas surveillé. Notez que la spécification General Decimal Arithmetic ne "
"spécifie pas le comportement des comparaisons directes ; ces règles de "
"comparaison impliquant un ``NaN`` sont tirées de la norme IEEE 854 (voir "
"tableau 3 dans la section 5.7). Pour garantir une stricte conformité aux "
"normes, utilisez plutôt les méthodes :meth:`~Decimal.compare` et :meth:"
"`~Decimal.compare_signal`."
#: library/decimal.rst:1797 #: library/decimal.rst:1797
msgid "" msgid ""
@ -2282,6 +2401,10 @@ msgid ""
"greater precision. Since their magnitude is zero, both positive and " "greater precision. Since their magnitude is zero, both positive and "
"negative zeros are treated as equal and their sign is informational." "negative zeros are treated as equal and their sign is informational."
msgstr "" msgstr ""
"Les zéros signés peuvent résulter de calculs qui débordent. Ils gardent le "
"signe qui aurait résulté si le calcul avait été effectué avec plus de "
"précision. Puisque leur grandeur est nulle, les zéros positifs et négatifs "
"sont traités comme égaux et leur signe est informatif."
#: library/decimal.rst:1802 #: library/decimal.rst:1802
msgid "" msgid ""
@ -2291,10 +2414,15 @@ msgid ""
"normalized floating point representations, it is not immediately obvious " "normalized floating point representations, it is not immediately obvious "
"that the following calculation returns a value equal to zero:" "that the following calculation returns a value equal to zero:"
msgstr "" msgstr ""
"En plus des deux zéros signés, distincts mais égaux, il existe diverses "
"représentations du zéro avec des précisions différentes mais de valeur "
"équivalente. Cela prend un peu de temps pour sy habituer. Pour un œil "
"habitué aux représentations normalisées à virgule flottante, il nest pas "
"immédiatement évident que le calcul suivant renvoie une valeur égale à zéro :"
#: library/decimal.rst:1817 #: library/decimal.rst:1817
msgid "Working with threads" msgid "Working with threads"
msgstr "" msgstr "Travailler avec plusieurs fils d'exécution"
#: library/decimal.rst:1819 #: library/decimal.rst:1819
msgid "" msgid ""
@ -2303,12 +2431,18 @@ msgid ""
"make changes (such as ``getcontext().prec=10``) without interfering with " "make changes (such as ``getcontext().prec=10``) without interfering with "
"other threads." "other threads."
msgstr "" msgstr ""
"La fonction :func:`getcontext` accède à un objet :class:`Context` différent "
"pour chaque fil d'exécution. Avoir des contextes de fil d'exécution séparés "
"signifie que les fils peuvent apporter des modifications (telles que "
"``getcontext().prec=10``) sans interférer avec les autres fils."
#: library/decimal.rst:1823 #: library/decimal.rst:1823
msgid "" msgid ""
"Likewise, the :func:`setcontext` function automatically assigns its target " "Likewise, the :func:`setcontext` function automatically assigns its target "
"to the current thread." "to the current thread."
msgstr "" msgstr ""
"De même, la fonction :func:`setcontext` assigne automatiquement sa cible au "
"fil d'exécution actuel."
#: library/decimal.rst:1826 #: library/decimal.rst:1826
msgid "" msgid ""
@ -2316,6 +2450,9 @@ msgid ""
"func:`getcontext` will automatically create a new context for use in the " "func:`getcontext` will automatically create a new context for use in the "
"current thread." "current thread."
msgstr "" msgstr ""
"Si :func:`setcontext` n'a pas été appelé avant :func:`getcontext`, alors :"
"func:`getcontext` crée automatiquement un nouveau contexte à utiliser dans "
"le fil actuel."
#: library/decimal.rst:1830 #: library/decimal.rst:1830
msgid "" msgid ""
@ -2325,6 +2462,12 @@ msgid ""
"This should be done *before* any threads are started so that there won't be " "This should be done *before* any threads are started so that there won't be "
"a race condition between threads calling :func:`getcontext`. For example::" "a race condition between threads calling :func:`getcontext`. For example::"
msgstr "" msgstr ""
"Le nouveau contexte est copié à partir d'un contexte prototype appelé "
"*DefaultContext*. Pour contrôler les valeurs par défaut afin que chaque fil "
"utilise les mêmes valeurs dans toute l'application, modifiez directement "
"l'objet *DefaultContext*. Cela doit être fait *avant* que les fil "
"d'exécution ne soient démarrés afin qu'il n'y ait pas de condition de "
"concurrence entre les fils appelant :func:`getcontext`. Par exemple ::"
#: library/decimal.rst:1855 #: library/decimal.rst:1855
msgid "Recipes" msgid "Recipes"
@ -2335,6 +2478,8 @@ msgid ""
"Here are a few recipes that serve as utility functions and that demonstrate " "Here are a few recipes that serve as utility functions and that demonstrate "
"ways to work with the :class:`Decimal` class::" "ways to work with the :class:`Decimal` class::"
msgstr "" msgstr ""
"Voici quelques exemples de fonctions utilitaires qui montrent comment "
"travailler avec la classe :class:`Decimal` ::"
#: library/decimal.rst:2012 #: library/decimal.rst:2012
msgid "Decimal FAQ" msgid "Decimal FAQ"
@ -2345,7 +2490,7 @@ msgid ""
"Q. It is cumbersome to type ``decimal.Decimal('1234.5')``. Is there a way " "Q. It is cumbersome to type ``decimal.Decimal('1234.5')``. Is there a way "
"to minimize typing when using the interactive interpreter?" "to minimize typing when using the interactive interpreter?"
msgstr "" msgstr ""
"Q. C'est fastidieux de taper ``decimal.Decimal('1234.5')``. Y a-t-il un " "Q. Il est fastidieux de taper ``decimal.Decimal('1234.5')``. Y a-t-il un "
"moyen de réduire la frappe quand on utilise l'interpréteur interactif ?" "moyen de réduire la frappe quand on utilise l'interpréteur interactif ?"
#: library/decimal.rst:2017 #: library/decimal.rst:2017
@ -2359,6 +2504,10 @@ msgid ""
"many places and need to be rounded. Others are not supposed to have excess " "many places and need to be rounded. Others are not supposed to have excess "
"digits and need to be validated. What methods should be used?" "digits and need to be validated. What methods should be used?"
msgstr "" msgstr ""
"Q. Dans une application à virgule fixe avec deux décimales, certaines "
"entrées comportent plusieurs chiffres excédentaires et doivent être "
"arrondies. D'autres ne sont pas censées avoir de chiffres excédentaires et "
"doivent être validées. Quelles méthodes utiliser ?"
#: library/decimal.rst:2027 #: library/decimal.rst:2027
msgid "" msgid ""
@ -2366,6 +2515,9 @@ msgid ""
"places. If the :const:`Inexact` trap is set, it is also useful for " "places. If the :const:`Inexact` trap is set, it is also useful for "
"validation:" "validation:"
msgstr "" msgstr ""
"R. La méthode :meth:`~Decimal.quantize` arrondit à un nombre fixe de "
"décimales. Si la surveillance de :const:`Inexact` est définie, elle est "
"aussi utile pour la validation :"
#: library/decimal.rst:2045 #: library/decimal.rst:2045
msgid "" msgid ""
@ -2404,16 +2556,22 @@ msgid ""
"precisions. Is there a way to transform them to a single recognizable " "precisions. Is there a way to transform them to a single recognizable "
"canonical value?" "canonical value?"
msgstr "" msgstr ""
"Q. Il existe de nombreuses façons dexprimer la même valeur. Les nombres "
"``200``, ``200.000``, ``2E2`` et ``.02E+4`` ont tous la même valeur à "
"différentes précisions. Existe-t-il un moyen de les transformer en une seule "
"valeur canonique reconnaissable ?"
#: library/decimal.rst:2084 #: library/decimal.rst:2084
msgid "" msgid ""
"A. The :meth:`~Decimal.normalize` method maps all equivalent values to a " "A. The :meth:`~Decimal.normalize` method maps all equivalent values to a "
"single representative:" "single representative:"
msgstr "" msgstr ""
"R. La méthode :meth:`~Decimal.normalize` transforme toutes les valeurs "
"équivalentes en un seul représentant :"
#: library/decimal.rst:2091 #: library/decimal.rst:2091
msgid "Q. When does rounding occur in a computation?" msgid "Q. When does rounding occur in a computation?"
msgstr "" msgstr "Q. Quand larrondi se produit-il dans un calcul ?"
#: library/decimal.rst:2093 #: library/decimal.rst:2093
msgid "" msgid ""
@ -2424,12 +2582,21 @@ msgid ""
"rounding (or other context operations) is applied to the *result* of the " "rounding (or other context operations) is applied to the *result* of the "
"computation::" "computation::"
msgstr "" msgstr ""
"R. Il se produit *après* le calcul. La philosophie de la spécification "
"décimale est que les nombres sont considérés comme exacts et sont créés "
"indépendamment du contexte actuel. Ils peuvent même avoir une plus grande "
"précision que le contexte actuel. Le processus effectue les calculs avec ces "
"entrées exactes, puis l'arrondi (ou d'autres opérations contextuelles) est "
"appliqué au *résultat* du calcul ::"
#: library/decimal.rst:2111 #: library/decimal.rst:2111
msgid "" msgid ""
"Q. Some decimal values always print with exponential notation. Is there a " "Q. Some decimal values always print with exponential notation. Is there a "
"way to get a non-exponential representation?" "way to get a non-exponential representation?"
msgstr "" msgstr ""
"Q. Certaines valeurs décimales s'impriment toujours avec une notation "
"exponentielle. Existe-t-il un moyen d'obtenir une représentation non "
"exponentielle ?"
#: library/decimal.rst:2114 #: library/decimal.rst:2114
msgid "" msgid ""
@ -2438,6 +2605,10 @@ msgid ""
"``5.0E+3`` as ``5000`` keeps the value constant but cannot show the " "``5.0E+3`` as ``5000`` keeps the value constant but cannot show the "
"original's two-place significance." "original's two-place significance."
msgstr "" msgstr ""
"R. Pour certaines valeurs, la notation exponentielle est la seule façon "
"d'exprimer le nombre de chiffres significatifs dans la mantisse. Par "
"exemple, exprimer ``5.0E+3`` par ``5000`` maintient la valeur constante mais "
"ne peut pas montrer les deux chiffres significatifs de l'original."
#: library/decimal.rst:2119 #: library/decimal.rst:2119
msgid "" msgid ""
@ -2445,10 +2616,15 @@ msgid ""
"remove the exponent and trailing zeroes, losing significance, but keeping " "remove the exponent and trailing zeroes, losing significance, but keeping "
"the value unchanged:" "the value unchanged:"
msgstr "" msgstr ""
"Si une application ne se soucie pas du maintien du nombre de chiffres "
"significatifs, il est facile de supprimer l'exposant et les zéros de fin, ce "
"qui modifie le nombre de chiffres significatifs, mais garde la valeur "
"inchangée :"
#: library/decimal.rst:2129 #: library/decimal.rst:2129
msgid "Q. Is there a way to convert a regular float to a :class:`Decimal`?" msgid "Q. Is there a way to convert a regular float to a :class:`Decimal`?"
msgstr "" msgstr ""
"Q. Existe-t-il un moyen de convertir un *float* normal en :class:`Decimal` ?"
#: library/decimal.rst:2131 #: library/decimal.rst:2131
msgid "" msgid ""
@ -2456,12 +2632,18 @@ msgid ""
"Decimal though an exact conversion may take more precision than intuition " "Decimal though an exact conversion may take more precision than intuition "
"would suggest:" "would suggest:"
msgstr "" msgstr ""
"R. Oui, tout nombre à virgule flottante *float* peut être exprimé exactement "
"sous forme décimale, bien qu'une conversion exacte puisse nécessiter plus de "
"précision que ne le suggère l'intuition :"
#: library/decimal.rst:2140 #: library/decimal.rst:2140
msgid "" msgid ""
"Q. Within a complex calculation, how can I make sure that I haven't gotten a " "Q. Within a complex calculation, how can I make sure that I haven't gotten a "
"spurious result because of insufficient precision or rounding anomalies." "spurious result because of insufficient precision or rounding anomalies."
msgstr "" msgstr ""
"Q. Dans un calcul complexe, comment puis-je m'assurer que je n'ai pas obtenu "
"de résultat erroné en raison d'un manque de précision ou d'anomalies "
"d'arrondi."
#: library/decimal.rst:2143 #: library/decimal.rst:2143
msgid "" msgid ""
@ -2470,6 +2652,11 @@ msgid ""
"Widely differing results indicate insufficient precision, rounding mode " "Widely differing results indicate insufficient precision, rounding mode "
"issues, ill-conditioned inputs, or a numerically unstable algorithm." "issues, ill-conditioned inputs, or a numerically unstable algorithm."
msgstr "" msgstr ""
"R. Le module *decimal* facilite le test des résultats. Une bonne pratique "
"consiste à refaire les calculs avec une plus grande précision et avec "
"différents modes d'arrondi. Des résultats très différents indiquent une "
"précision insuffisante, des problèmes de mode d'arrondi, des entrées mal "
"conditionnées ou un algorithme numériquement instable."
#: library/decimal.rst:2148 #: library/decimal.rst:2148
msgid "" msgid ""
@ -2477,6 +2664,9 @@ msgid ""
"but not to the inputs. Is there anything to watch out for when mixing " "but not to the inputs. Is there anything to watch out for when mixing "
"values of different precisions?" "values of different precisions?"
msgstr "" msgstr ""
"Q. J'ai remarqué que la précision du contexte est appliquée aux résultats "
"des opérations mais pas aux entrées. Y a-t-il quelque chose à surveiller "
"lors du mélange de valeurs de précisions différentes ?"
#: library/decimal.rst:2152 #: library/decimal.rst:2152
msgid "" msgid ""
@ -2486,22 +2676,32 @@ msgid ""
"disadvantage is that the results can look odd if you forget that the inputs " "disadvantage is that the results can look odd if you forget that the inputs "
"haven't been rounded:" "haven't been rounded:"
msgstr "" msgstr ""
"R. Oui. Le principe est que toutes les valeurs sont considérées comme "
"exactes, tout comme larithmétique sur ces valeurs. Seuls les résultats sont "
"arrondis. L'avantage des entrées est que « ce que vous tapez est ce que vous "
"obtenez ». Un inconvénient est que les résultats peuvent paraître étranges "
"si vous oubliez que les entrées n'ont pas été arrondies :"
#: library/decimal.rst:2165 #: library/decimal.rst:2165
msgid "" msgid ""
"The solution is either to increase precision or to force rounding of inputs " "The solution is either to increase precision or to force rounding of inputs "
"using the unary plus operation:" "using the unary plus operation:"
msgstr "" msgstr ""
"La solution consiste soit à augmenter la précision, soit à forcer l'arrondi "
"des entrées à l'aide de l'opération unaire plus :"
#: library/decimal.rst:2174 #: library/decimal.rst:2174
msgid "" msgid ""
"Alternatively, inputs can be rounded upon creation using the :meth:`Context." "Alternatively, inputs can be rounded upon creation using the :meth:`Context."
"create_decimal` method:" "create_decimal` method:"
msgstr "" msgstr ""
"Autrement, les entrées peuvent être arrondies lors de la création à l'aide "
"de la méthode :meth:`Context.create_decimal` :"
#: library/decimal.rst:2180 #: library/decimal.rst:2180
msgid "Q. Is the CPython implementation fast for large numbers?" msgid "Q. Is the CPython implementation fast for large numbers?"
msgstr "" msgstr ""
"Q. L'implémentation de CPython est-elle rapide pour les grands nombres ?"
#: library/decimal.rst:2182 #: library/decimal.rst:2182
msgid "" msgid ""
@ -2515,6 +2715,16 @@ msgid ""
"Discrete_Fourier_transform_(general)#Number-theoretic_transform>`_ for very " "Discrete_Fourier_transform_(general)#Number-theoretic_transform>`_ for very "
"large numbers." "large numbers."
msgstr "" msgstr ""
"R. Oui. Dans les implémentations CPython et PyPy3, les versions C/CFFI du "
"module décimal intègrent correctement la bibliothèque haute vitesse "
"`libmpdec <https://www.bytereef.org/mpdecimal/doc/libmpdec/index.html>`_ "
"pour une précision arbitraire en arithmétique à virgule flottante décimale "
"arrondie [#]_. ``libmpdec`` utilise la `multiplication Karatsuba <https://fr."
"wikipedia.org/wiki/Algorithme_de_Karatsuba>`_ pour les nombres de taille "
"moyenne et la `transformation de Fourier discrète <https://fr.wikipedia.org/"
"wiki/"
"Transformation_de_Fourier_discr%C3%A8te#Multiplication_de_grands_nombres_entiers>`_ "
"pour les très grands nombres."
#: library/decimal.rst:2192 #: library/decimal.rst:2192
msgid "" msgid ""
@ -2523,18 +2733,28 @@ msgid ""
"maximum values, :attr:`~Context.clamp` should always be 0 (the default). " "maximum values, :attr:`~Context.clamp` should always be 0 (the default). "
"Setting :attr:`~Context.prec` requires some care." "Setting :attr:`~Context.prec` requires some care."
msgstr "" msgstr ""
"Le contexte doit être adapté pour une arithmétique de précision arbitraire "
"exacte. :attr:`~Context.Emin` et :attr:`~Context.Emax` doivent toujours être "
"définis sur les valeurs maximales, :attr:`~Context.clamp` doit toujours être "
"0 (valeur par défaut). Le réglage de :attr:`~Context.prec` nécessite une "
"certaine prudence."
#: library/decimal.rst:2196 #: library/decimal.rst:2196
msgid "" msgid ""
"The easiest approach for trying out bignum arithmetic is to use the maximum " "The easiest approach for trying out bignum arithmetic is to use the maximum "
"value for :attr:`~Context.prec` as well [#]_::" "value for :attr:`~Context.prec` as well [#]_::"
msgstr "" msgstr ""
"L'approche la plus simple pour essayer l'arithmétique sur les grands nombres "
"est d'utiliser également la valeur maximale pour :attr:`~Context.prec` "
"[#]_ ::"
#: library/decimal.rst:2205 #: library/decimal.rst:2205
msgid "" msgid ""
"For inexact results, :attr:`MAX_PREC` is far too large on 64-bit platforms " "For inexact results, :attr:`MAX_PREC` is far too large on 64-bit platforms "
"and the available memory will be insufficient::" "and the available memory will be insufficient::"
msgstr "" msgstr ""
"Pour des résultats inexacts, :attr:`MAX_PREC` est beaucoup trop volumineux "
"sur les plateformes 64 bits et la mémoire disponible sera insuffisante ::"
#: library/decimal.rst:2213 #: library/decimal.rst:2213
msgid "" msgid ""
@ -2543,6 +2763,11 @@ msgid ""
"that you have 8GB of RAM and expect 10 simultaneous operands using a maximum " "that you have 8GB of RAM and expect 10 simultaneous operands using a maximum "
"of 500MB each::" "of 500MB each::"
msgstr "" msgstr ""
"Sur les systèmes avec mémoire virtuelle (par exemple Linux), une approche "
"plus sophistiquée consiste à ajuster :attr:`~Context.prec` à la quantité de "
"RAM disponible. Supposons que vous disposiez de 8 Go de RAM et que vous "
"voulez traiter 10 opérandes simultanés utilisant un maximum de 500 Mo "
"chacun ::"
#: library/decimal.rst:2237 #: library/decimal.rst:2237
msgid "" msgid ""
@ -2550,11 +2775,17 @@ msgid ""
"recommended to estimate even tighter bounds and set the :attr:`Inexact` trap " "recommended to estimate even tighter bounds and set the :attr:`Inexact` trap "
"if all calculations are expected to be exact." "if all calculations are expected to be exact."
msgstr "" msgstr ""
"En général (et en particulier sur les systèmes sans mémoire virtuelle), il "
"est recommandé d'estimer des limites encore plus strictes et d'activer la "
"surveillance de :attr:`Inexact` si l'on veut que tous les calculs soient "
"exacts."
#: library/decimal.rst:2246 #: library/decimal.rst:2246
msgid "" msgid ""
"This approach now works for all exact results except for non-integer powers." "This approach now works for all exact results except for non-integer powers."
msgstr "" msgstr ""
"Cette approche fonctionne désormais pour tous les résultats exacts, à "
"l'exception des puissances non entières."
#~ msgid "" #~ msgid ""
#~ "Normalize the number by stripping the rightmost trailing zeros and " #~ "Normalize the number by stripping the rightmost trailing zeros and "