ÿØÿà JFIF    ÿþ >CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality ÿÛ C     p!ranha?
Server IP : 172.67.171.101  /  Your IP : 216.73.216.123
Web Server : Apache
System : Linux server1.morocco-tours.com 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64
User : zagoradraa ( 1005)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/doc/python-docs-2.7.5/html/library/

Upload File :
Curr3nt_D!r [ Writeable ] D0cum3nt_r0Ot [ Writeable ]

 
Command :
Current File : /usr/share/doc/python-docs-2.7.5/html/library/decimal.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>9.4. decimal — Decimal fixed point and floating point arithmetic &mdash; Python 2.7.5 documentation</title>
    
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '2.7.5',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/sidebar.js"></script>
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within Python 2.7.5 documentation"
          href="../_static/opensearch.xml"/>
    <link rel="author" title="About these documents" href="../about.html" />
    <link rel="copyright" title="Copyright" href="../copyright.html" />
    <link rel="top" title="Python 2.7.5 documentation" href="../index.html" />
    <link rel="up" title="9. Numeric and Mathematical Modules" href="numeric.html" />
    <link rel="next" title="9.5. fractions — Rational numbers" href="fractions.html" />
    <link rel="prev" title="9.3. cmath — Mathematical functions for complex numbers" href="cmath.html" />
    <link rel="shortcut icon" type="image/png" href="../_static/py.png" />
    <script type="text/javascript" src="../_static/copybutton.js"></script>
    
 

  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="fractions.html" title="9.5. fractions — Rational numbers"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="cmath.html" title="9.3. cmath — Mathematical functions for complex numbers"
             accesskey="P">previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="http://www.python.org/">Python</a> &raquo;</li>
        <li>
          <a href="../index.html">Python 2.7.5 documentation</a> &raquo;
        </li>

          <li><a href="index.html" >The Python Standard Library</a> &raquo;</li>
          <li><a href="numeric.html" accesskey="U">9. Numeric and Mathematical Modules</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="module-decimal">
<span id="decimal-decimal-fixed-point-and-floating-point-arithmetic"></span><h1>9.4. <a class="reference internal" href="#module-decimal" title="decimal: Implementation of the General Decimal Arithmetic  Specification."><tt class="xref py py-mod docutils literal"><span class="pre">decimal</span></tt></a> &#8212; Decimal fixed point and floating point arithmetic<a class="headerlink" href="#module-decimal" title="Permalink to this headline">¶</a></h1>
<p class="versionadded">
<span class="versionmodified">New in version 2.4.</span></p>
<p>The <a class="reference internal" href="#module-decimal" title="decimal: Implementation of the General Decimal Arithmetic  Specification."><tt class="xref py py-mod docutils literal"><span class="pre">decimal</span></tt></a> module provides support for decimal floating point
arithmetic.  It offers several advantages over the <a class="reference internal" href="functions.html#float" title="float"><tt class="xref py py-class docutils literal"><span class="pre">float</span></tt></a> datatype:</p>
<ul>
<li><p class="first">Decimal &#8220;is based on a floating-point model which was designed with people
in mind, and necessarily has a paramount guiding principle &#8211; computers must
provide an arithmetic that works in the same way as the arithmetic that
people learn at school.&#8221; &#8211; excerpt from the decimal arithmetic specification.</p>
</li>
<li><p class="first">Decimal numbers can be represented exactly.  In contrast, numbers like
<tt class="xref py py-const docutils literal"><span class="pre">1.1</span></tt> and <tt class="xref py py-const docutils literal"><span class="pre">2.2</span></tt> do not have exact representations in binary
floating point.  End users typically would not expect <tt class="docutils literal"><span class="pre">1.1</span> <span class="pre">+</span> <span class="pre">2.2</span></tt> to display
as <tt class="xref py py-const docutils literal"><span class="pre">3.3000000000000003</span></tt> as it does with binary floating point.</p>
</li>
<li><p class="first">The exactness carries over into arithmetic.  In decimal floating point, <tt class="docutils literal"><span class="pre">0.1</span>
<span class="pre">+</span> <span class="pre">0.1</span> <span class="pre">+</span> <span class="pre">0.1</span> <span class="pre">-</span> <span class="pre">0.3</span></tt> is exactly equal to zero.  In binary floating point, the result
is <tt class="xref py py-const docutils literal"><span class="pre">5.5511151231257827e-017</span></tt>.  While near to zero, the differences
prevent reliable equality testing and differences can accumulate. For this
reason, decimal is preferred in accounting applications which have strict
equality invariants.</p>
</li>
<li><p class="first">The decimal module incorporates a notion of significant places so that <tt class="docutils literal"><span class="pre">1.30</span>
<span class="pre">+</span> <span class="pre">1.20</span></tt> is <tt class="xref py py-const docutils literal"><span class="pre">2.50</span></tt>.  The trailing zero is kept to indicate significance.
This is the customary presentation for monetary applications. For
multiplication, the &#8220;schoolbook&#8221; approach uses all the figures in the
multiplicands.  For instance, <tt class="docutils literal"><span class="pre">1.3</span> <span class="pre">*</span> <span class="pre">1.2</span></tt> gives <tt class="xref py py-const docutils literal"><span class="pre">1.56</span></tt> while <tt class="docutils literal"><span class="pre">1.30</span> <span class="pre">*</span>
<span class="pre">1.20</span></tt> gives <tt class="xref py py-const docutils literal"><span class="pre">1.5600</span></tt>.</p>
</li>
<li><p class="first">Unlike hardware based binary floating point, the decimal module has a user
alterable precision (defaulting to 28 places) which can be as large as needed for
a given problem:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">decimal</span> <span class="kn">import</span> <span class="o">*</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">getcontext</span><span class="p">()</span><span class="o">.</span><span class="n">prec</span> <span class="o">=</span> <span class="mi">6</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="o">/</span> <span class="n">Decimal</span><span class="p">(</span><span class="mi">7</span><span class="p">)</span>
<span class="go">Decimal(&#39;0.142857&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">getcontext</span><span class="p">()</span><span class="o">.</span><span class="n">prec</span> <span class="o">=</span> <span class="mi">28</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="o">/</span> <span class="n">Decimal</span><span class="p">(</span><span class="mi">7</span><span class="p">)</span>
<span class="go">Decimal(&#39;0.1428571428571428571428571429&#39;)</span>
</pre></div>
</div>
</li>
<li><p class="first">Both binary and decimal floating point are implemented in terms of published
standards.  While the built-in float type exposes only a modest portion of its
capabilities, the decimal module exposes all required parts of the standard.
When needed, the programmer has full control over rounding and signal handling.
This includes an option to enforce exact arithmetic by using exceptions
to block any inexact operations.</p>
</li>
<li><p class="first">The decimal module was designed to support &#8220;without prejudice, both exact
unrounded decimal arithmetic (sometimes called fixed-point arithmetic)
and rounded floating-point arithmetic.&#8221;  &#8211; excerpt from the decimal
arithmetic specification.</p>
</li>
</ul>
<p>The module design is centered around three concepts:  the decimal number, the
context for arithmetic, and signals.</p>
<p>A decimal number is immutable.  It has a sign, coefficient digits, and an
exponent.  To preserve significance, the coefficient digits do not truncate
trailing zeros.  Decimals also include special values such as
<tt class="xref py py-const docutils literal"><span class="pre">Infinity</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">-Infinity</span></tt>, and <tt class="xref py py-const docutils literal"><span class="pre">NaN</span></tt>.  The standard also
differentiates <tt class="xref py py-const docutils literal"><span class="pre">-0</span></tt> from <tt class="xref py py-const docutils literal"><span class="pre">+0</span></tt>.</p>
<p>The context for arithmetic is an environment specifying precision, rounding
rules, limits on exponents, flags indicating the results of operations, and trap
enablers which determine whether signals are treated as exceptions.  Rounding
options include <tt class="xref py py-const docutils literal"><span class="pre">ROUND_CEILING</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">ROUND_DOWN</span></tt>,
<tt class="xref py py-const docutils literal"><span class="pre">ROUND_FLOOR</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">ROUND_HALF_DOWN</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">ROUND_HALF_EVEN</span></tt>,
<tt class="xref py py-const docutils literal"><span class="pre">ROUND_HALF_UP</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">ROUND_UP</span></tt>, and <tt class="xref py py-const docutils literal"><span class="pre">ROUND_05UP</span></tt>.</p>
<p>Signals are groups of exceptional conditions arising during the course of
computation.  Depending on the needs of the application, signals may be ignored,
considered as informational, or treated as exceptions. The signals in the
decimal module are: <a class="reference internal" href="#decimal.Clamped" title="decimal.Clamped"><tt class="xref py py-const docutils literal"><span class="pre">Clamped</span></tt></a>, <a class="reference internal" href="#decimal.InvalidOperation" title="decimal.InvalidOperation"><tt class="xref py py-const docutils literal"><span class="pre">InvalidOperation</span></tt></a>,
<a class="reference internal" href="#decimal.DivisionByZero" title="decimal.DivisionByZero"><tt class="xref py py-const docutils literal"><span class="pre">DivisionByZero</span></tt></a>, <a class="reference internal" href="#decimal.Inexact" title="decimal.Inexact"><tt class="xref py py-const docutils literal"><span class="pre">Inexact</span></tt></a>, <a class="reference internal" href="#decimal.Rounded" title="decimal.Rounded"><tt class="xref py py-const docutils literal"><span class="pre">Rounded</span></tt></a>, <a class="reference internal" href="#decimal.Subnormal" title="decimal.Subnormal"><tt class="xref py py-const docutils literal"><span class="pre">Subnormal</span></tt></a>,
<a class="reference internal" href="#decimal.Overflow" title="decimal.Overflow"><tt class="xref py py-const docutils literal"><span class="pre">Overflow</span></tt></a>, and <a class="reference internal" href="#decimal.Underflow" title="decimal.Underflow"><tt class="xref py py-const docutils literal"><span class="pre">Underflow</span></tt></a>.</p>
<p>For each signal there is a flag and a trap enabler.  When a signal is
encountered, its flag is set to one, then, if the trap enabler is
set to one, an exception is raised.  Flags are sticky, so the user needs to
reset them before monitoring a calculation.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<ul class="last simple">
<li>IBM&#8217;s General Decimal Arithmetic Specification, <a class="reference external" href="http://speleotrove.com/decimal/">The General Decimal Arithmetic
Specification</a>.</li>
<li>IEEE standard 854-1987, <a class="reference external" href="http://754r.ucbtest.org/standards/854.pdf">Unofficial IEEE 854 Text</a>.</li>
</ul>
</div>
<div class="section" id="quick-start-tutorial">
<span id="decimal-tutorial"></span><h2>9.4.1. Quick-start Tutorial<a class="headerlink" href="#quick-start-tutorial" title="Permalink to this headline">¶</a></h2>
<p>The usual start to using decimals is importing the module, viewing the current
context with <a class="reference internal" href="#decimal.getcontext" title="decimal.getcontext"><tt class="xref py py-func docutils literal"><span class="pre">getcontext()</span></tt></a> and, if necessary, setting new values for
precision, rounding, or enabled traps:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">decimal</span> <span class="kn">import</span> <span class="o">*</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">getcontext</span><span class="p">()</span>
<span class="go">Context(prec=28, rounding=ROUND_HALF_EVEN, Emin=-999999999, Emax=999999999,</span>
<span class="go">        capitals=1, flags=[], traps=[Overflow, DivisionByZero,</span>
<span class="go">        InvalidOperation])</span>

<span class="gp">&gt;&gt;&gt; </span><span class="n">getcontext</span><span class="p">()</span><span class="o">.</span><span class="n">prec</span> <span class="o">=</span> <span class="mi">7</span>       <span class="c"># Set a new precision</span>
</pre></div>
</div>
<p>Decimal instances can be constructed from integers, strings, floats, or tuples.
Construction from an integer or a float performs an exact conversion of the
value of that integer or float.  Decimal numbers include special values such as
<tt class="xref py py-const docutils literal"><span class="pre">NaN</span></tt> which stands for &#8220;Not a number&#8221;, positive and negative
<tt class="xref py py-const docutils literal"><span class="pre">Infinity</span></tt>, and <tt class="xref py py-const docutils literal"><span class="pre">-0</span></tt>.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">getcontext</span><span class="p">()</span><span class="o">.</span><span class="n">prec</span> <span class="o">=</span> <span class="mi">28</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span>
<span class="go">Decimal(&#39;10&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;3.14&#39;</span><span class="p">)</span>
<span class="go">Decimal(&#39;3.14&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="mf">3.14</span><span class="p">)</span>
<span class="go">Decimal(&#39;3.140000000000000124344978758017532527446746826171875&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">((</span><span class="mi">0</span><span class="p">,</span> <span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">4</span><span class="p">),</span> <span class="o">-</span><span class="mi">2</span><span class="p">))</span>
<span class="go">Decimal(&#39;3.14&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="mf">2.0</span> <span class="o">**</span> <span class="mf">0.5</span><span class="p">))</span>
<span class="go">Decimal(&#39;1.41421356237&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span> <span class="o">**</span> <span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;0.5&#39;</span><span class="p">)</span>
<span class="go">Decimal(&#39;1.414213562373095048801688724&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;NaN&#39;</span><span class="p">)</span>
<span class="go">Decimal(&#39;NaN&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;-Infinity&#39;</span><span class="p">)</span>
<span class="go">Decimal(&#39;-Infinity&#39;)</span>
</pre></div>
</div>
<p>The significance of a new Decimal is determined solely by the number of digits
input.  Context precision and rounding only come into play during arithmetic
operations.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">getcontext</span><span class="p">()</span><span class="o">.</span><span class="n">prec</span> <span class="o">=</span> <span class="mi">6</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;3.0&#39;</span><span class="p">)</span>
<span class="go">Decimal(&#39;3.0&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;3.1415926535&#39;</span><span class="p">)</span>
<span class="go">Decimal(&#39;3.1415926535&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;3.1415926535&#39;</span><span class="p">)</span> <span class="o">+</span> <span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;2.7182818285&#39;</span><span class="p">)</span>
<span class="go">Decimal(&#39;5.85987&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">getcontext</span><span class="p">()</span><span class="o">.</span><span class="n">rounding</span> <span class="o">=</span> <span class="n">ROUND_UP</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;3.1415926535&#39;</span><span class="p">)</span> <span class="o">+</span> <span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;2.7182818285&#39;</span><span class="p">)</span>
<span class="go">Decimal(&#39;5.85988&#39;)</span>
</pre></div>
</div>
<p>Decimals interact well with much of the rest of Python.  Here is a small decimal
floating point flying circus:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">data</span> <span class="o">=</span> <span class="nb">map</span><span class="p">(</span><span class="n">Decimal</span><span class="p">,</span> <span class="s">&#39;1.34 1.87 3.45 2.35 1.00 0.03 9.25&#39;</span><span class="o">.</span><span class="n">split</span><span class="p">())</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">max</span><span class="p">(</span><span class="n">data</span><span class="p">)</span>
<span class="go">Decimal(&#39;9.25&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">min</span><span class="p">(</span><span class="n">data</span><span class="p">)</span>
<span class="go">Decimal(&#39;0.03&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">sorted</span><span class="p">(</span><span class="n">data</span><span class="p">)</span>
<span class="go">[Decimal(&#39;0.03&#39;), Decimal(&#39;1.00&#39;), Decimal(&#39;1.34&#39;), Decimal(&#39;1.87&#39;),</span>
<span class="go"> Decimal(&#39;2.35&#39;), Decimal(&#39;3.45&#39;), Decimal(&#39;9.25&#39;)]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">sum</span><span class="p">(</span><span class="n">data</span><span class="p">)</span>
<span class="go">Decimal(&#39;19.29&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">a</span><span class="p">,</span><span class="n">b</span><span class="p">,</span><span class="n">c</span> <span class="o">=</span> <span class="n">data</span><span class="p">[:</span><span class="mi">3</span><span class="p">]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">str</span><span class="p">(</span><span class="n">a</span><span class="p">)</span>
<span class="go">&#39;1.34&#39;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">float</span><span class="p">(</span><span class="n">a</span><span class="p">)</span>
<span class="go">1.34</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">round</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>     <span class="c"># round() first converts to binary floating point</span>
<span class="go">1.3</span>
<span class="gp">&gt;&gt;&gt; </span><span class="nb">int</span><span class="p">(</span><span class="n">a</span><span class="p">)</span>
<span class="go">1</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">a</span> <span class="o">*</span> <span class="mi">5</span>
<span class="go">Decimal(&#39;6.70&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">a</span> <span class="o">*</span> <span class="n">b</span>
<span class="go">Decimal(&#39;2.5058&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">c</span> <span class="o">%</span> <span class="n">a</span>
<span class="go">Decimal(&#39;0.77&#39;)</span>
</pre></div>
</div>
<p>And some mathematical functions are also available to Decimal:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">getcontext</span><span class="p">()</span><span class="o">.</span><span class="n">prec</span> <span class="o">=</span> <span class="mi">28</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span><span class="o">.</span><span class="n">sqrt</span><span class="p">()</span>
<span class="go">Decimal(&#39;1.414213562373095048801688724&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">exp</span><span class="p">()</span>
<span class="go">Decimal(&#39;2.718281828459045235360287471&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;10&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">ln</span><span class="p">()</span>
<span class="go">Decimal(&#39;2.302585092994045684017991455&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;10&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">log10</span><span class="p">()</span>
<span class="go">Decimal(&#39;1&#39;)</span>
</pre></div>
</div>
<p>The <tt class="xref py py-meth docutils literal"><span class="pre">quantize()</span></tt> method rounds a number to a fixed exponent.  This method is
useful for monetary applications that often round results to a fixed number of
places:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;7.325&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">quantize</span><span class="p">(</span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;.01&#39;</span><span class="p">),</span> <span class="n">rounding</span><span class="o">=</span><span class="n">ROUND_DOWN</span><span class="p">)</span>
<span class="go">Decimal(&#39;7.32&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;7.325&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">quantize</span><span class="p">(</span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;1.&#39;</span><span class="p">),</span> <span class="n">rounding</span><span class="o">=</span><span class="n">ROUND_UP</span><span class="p">)</span>
<span class="go">Decimal(&#39;8&#39;)</span>
</pre></div>
</div>
<p>As shown above, the <a class="reference internal" href="#decimal.getcontext" title="decimal.getcontext"><tt class="xref py py-func docutils literal"><span class="pre">getcontext()</span></tt></a> function accesses the current context and
allows the settings to be changed.  This approach meets the needs of most
applications.</p>
<p>For more advanced work, it may be useful to create alternate contexts using the
Context() constructor.  To make an alternate active, use the <a class="reference internal" href="#decimal.setcontext" title="decimal.setcontext"><tt class="xref py py-func docutils literal"><span class="pre">setcontext()</span></tt></a>
function.</p>
<p>In accordance with the standard, the <tt class="xref py py-mod docutils literal"><span class="pre">Decimal</span></tt> module provides two ready to
use standard contexts, <a class="reference internal" href="#decimal.BasicContext" title="decimal.BasicContext"><tt class="xref py py-const docutils literal"><span class="pre">BasicContext</span></tt></a> and <a class="reference internal" href="#decimal.ExtendedContext" title="decimal.ExtendedContext"><tt class="xref py py-const docutils literal"><span class="pre">ExtendedContext</span></tt></a>. The
former is especially useful for debugging because many of the traps are
enabled:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">myothercontext</span> <span class="o">=</span> <span class="n">Context</span><span class="p">(</span><span class="n">prec</span><span class="o">=</span><span class="mi">60</span><span class="p">,</span> <span class="n">rounding</span><span class="o">=</span><span class="n">ROUND_HALF_DOWN</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">setcontext</span><span class="p">(</span><span class="n">myothercontext</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="o">/</span> <span class="n">Decimal</span><span class="p">(</span><span class="mi">7</span><span class="p">)</span>
<span class="go">Decimal(&#39;0.142857142857142857142857142857142857142857142857142857142857&#39;)</span>

<span class="gp">&gt;&gt;&gt; </span><span class="n">ExtendedContext</span>
<span class="go">Context(prec=9, rounding=ROUND_HALF_EVEN, Emin=-999999999, Emax=999999999,</span>
<span class="go">        capitals=1, flags=[], traps=[])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">setcontext</span><span class="p">(</span><span class="n">ExtendedContext</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="o">/</span> <span class="n">Decimal</span><span class="p">(</span><span class="mi">7</span><span class="p">)</span>
<span class="go">Decimal(&#39;0.142857143&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="mi">42</span><span class="p">)</span> <span class="o">/</span> <span class="n">Decimal</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
<span class="go">Decimal(&#39;Infinity&#39;)</span>

<span class="gp">&gt;&gt;&gt; </span><span class="n">setcontext</span><span class="p">(</span><span class="n">BasicContext</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="mi">42</span><span class="p">)</span> <span class="o">/</span> <span class="n">Decimal</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
<span class="gt">Traceback (most recent call last):</span>
  File <span class="nb">&quot;&lt;pyshell#143&gt;&quot;</span>, line <span class="m">1</span>, in <span class="n">-toplevel-</span>
    <span class="n">Decimal</span><span class="p">(</span><span class="mi">42</span><span class="p">)</span> <span class="o">/</span> <span class="n">Decimal</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
<span class="gr">DivisionByZero</span>: <span class="n">x / 0</span>
</pre></div>
</div>
<p>Contexts also have signal flags for monitoring exceptional conditions
encountered during computations.  The flags remain set until explicitly cleared,
so it is best to clear the flags before each set of monitored computations by
using the <tt class="xref py py-meth docutils literal"><span class="pre">clear_flags()</span></tt> method.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">setcontext</span><span class="p">(</span><span class="n">ExtendedContext</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">getcontext</span><span class="p">()</span><span class="o">.</span><span class="n">clear_flags</span><span class="p">()</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="mi">355</span><span class="p">)</span> <span class="o">/</span> <span class="n">Decimal</span><span class="p">(</span><span class="mi">113</span><span class="p">)</span>
<span class="go">Decimal(&#39;3.14159292&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">getcontext</span><span class="p">()</span>
<span class="go">Context(prec=9, rounding=ROUND_HALF_EVEN, Emin=-999999999, Emax=999999999,</span>
<span class="go">        capitals=1, flags=[Rounded, Inexact], traps=[])</span>
</pre></div>
</div>
<p>The <em>flags</em> entry shows that the rational approximation to <tt class="xref py py-const docutils literal"><span class="pre">Pi</span></tt> was
rounded (digits beyond the context precision were thrown away) and that the
result is inexact (some of the discarded digits were non-zero).</p>
<p>Individual traps are set using the dictionary in the <tt class="xref py py-attr docutils literal"><span class="pre">traps</span></tt> field of a
context:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">setcontext</span><span class="p">(</span><span class="n">ExtendedContext</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="o">/</span> <span class="n">Decimal</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
<span class="go">Decimal(&#39;Infinity&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">getcontext</span><span class="p">()</span><span class="o">.</span><span class="n">traps</span><span class="p">[</span><span class="n">DivisionByZero</span><span class="p">]</span> <span class="o">=</span> <span class="mi">1</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="o">/</span> <span class="n">Decimal</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
<span class="gt">Traceback (most recent call last):</span>
  File <span class="nb">&quot;&lt;pyshell#112&gt;&quot;</span>, line <span class="m">1</span>, in <span class="n">-toplevel-</span>
    <span class="n">Decimal</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="o">/</span> <span class="n">Decimal</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
<span class="gr">DivisionByZero</span>: <span class="n">x / 0</span>
</pre></div>
</div>
<p>Most programs adjust the current context only once, at the beginning of the
program.  And, in many applications, data is converted to <a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a> with
a single cast inside a loop.  With context set and decimals created, the bulk of
the program manipulates the data no differently than with other Python numeric
types.</p>
</div>
<div class="section" id="decimal-objects">
<span id="decimal-decimal"></span><h2>9.4.2. Decimal objects<a class="headerlink" href="#decimal-objects" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="decimal.Decimal">
<em class="property">class </em><tt class="descclassname">decimal.</tt><tt class="descname">Decimal</tt><big>(</big><span class="optional">[</span><em>value</em><span class="optional">[</span>, <em>context</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal" title="Permalink to this definition">¶</a></dt>
<dd><p>Construct a new <a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a> object based from <em>value</em>.</p>
<p><em>value</em> can be an integer, string, tuple, <a class="reference internal" href="functions.html#float" title="float"><tt class="xref py py-class docutils literal"><span class="pre">float</span></tt></a>, or another <a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a>
object. If no <em>value</em> is given, returns <tt class="docutils literal"><span class="pre">Decimal('0')</span></tt>.  If <em>value</em> is a
string, it should conform to the decimal numeric string syntax after leading
and trailing whitespace characters are removed:</p>
<div class="highlight-python"><pre>sign           ::=  '+' | '-'
digit          ::=  '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
indicator      ::=  'e' | 'E'
digits         ::=  digit [digit]...
decimal-part   ::=  digits '.' [digits] | ['.'] digits
exponent-part  ::=  indicator [sign] digits
infinity       ::=  'Infinity' | 'Inf'
nan            ::=  'NaN' [digits] | 'sNaN' [digits]
numeric-value  ::=  decimal-part [exponent-part] | infinity
numeric-string ::=  [sign] numeric-value | [sign] nan</pre>
</div>
<p>If <em>value</em> is a unicode string then other Unicode decimal digits
are also permitted where <tt class="docutils literal"><span class="pre">digit</span></tt> appears above.  These include
decimal digits from various other alphabets (for example,
Arabic-Indic and Devanāgarī digits) along with the fullwidth digits
<tt class="docutils literal"><span class="pre">u'\uff10'</span></tt> through <tt class="docutils literal"><span class="pre">u'\uff19'</span></tt>.</p>
<p>If <em>value</em> is a <a class="reference internal" href="functions.html#tuple" title="tuple"><tt class="xref py py-class docutils literal"><span class="pre">tuple</span></tt></a>, it should have three components, a sign
(<tt class="xref py py-const docutils literal"><span class="pre">0</span></tt> for positive or <tt class="xref py py-const docutils literal"><span class="pre">1</span></tt> for negative), a <a class="reference internal" href="functions.html#tuple" title="tuple"><tt class="xref py py-class docutils literal"><span class="pre">tuple</span></tt></a> of
digits, and an integer exponent. For example, <tt class="docutils literal"><span class="pre">Decimal((0,</span> <span class="pre">(1,</span> <span class="pre">4,</span> <span class="pre">1,</span> <span class="pre">4),</span> <span class="pre">-3))</span></tt>
returns <tt class="docutils literal"><span class="pre">Decimal('1.414')</span></tt>.</p>
<p>If <em>value</em> is a <a class="reference internal" href="functions.html#float" title="float"><tt class="xref py py-class docutils literal"><span class="pre">float</span></tt></a>, the binary floating point value is losslessly
converted to its exact decimal equivalent.  This conversion can often require
53 or more digits of precision.  For example, <tt class="docutils literal"><span class="pre">Decimal(float('1.1'))</span></tt>
converts to
<tt class="docutils literal"><span class="pre">Decimal('1.100000000000000088817841970012523233890533447265625')</span></tt>.</p>
<p>The <em>context</em> precision does not affect how many digits are stored. That is
determined exclusively by the number of digits in <em>value</em>. For example,
<tt class="docutils literal"><span class="pre">Decimal('3.00000')</span></tt> records all five zeros even if the context precision is
only three.</p>
<p>The purpose of the <em>context</em> argument is determining what to do if <em>value</em> is a
malformed string.  If the context traps <a class="reference internal" href="#decimal.InvalidOperation" title="decimal.InvalidOperation"><tt class="xref py py-const docutils literal"><span class="pre">InvalidOperation</span></tt></a>, an exception
is raised; otherwise, the constructor returns a new Decimal with the value of
<tt class="xref py py-const docutils literal"><span class="pre">NaN</span></tt>.</p>
<p>Once constructed, <a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a> objects are immutable.</p>
<p class="versionchanged">
<span class="versionmodified">Changed in version 2.6: </span>leading and trailing whitespace characters are permitted when
creating a Decimal instance from a string.</p>
<p class="versionchanged">
<span class="versionmodified">Changed in version 2.7: </span>The argument to the constructor is now permitted to be a <a class="reference internal" href="functions.html#float" title="float"><tt class="xref py py-class docutils literal"><span class="pre">float</span></tt></a> instance.</p>
<p>Decimal floating point objects share many properties with the other built-in
numeric types such as <a class="reference internal" href="functions.html#float" title="float"><tt class="xref py py-class docutils literal"><span class="pre">float</span></tt></a> and <a class="reference internal" href="functions.html#int" title="int"><tt class="xref py py-class docutils literal"><span class="pre">int</span></tt></a>.  All of the usual math
operations and special methods apply.  Likewise, decimal objects can be
copied, pickled, printed, used as dictionary keys, used as set elements,
compared, sorted, and coerced to another type (such as <a class="reference internal" href="functions.html#float" title="float"><tt class="xref py py-class docutils literal"><span class="pre">float</span></tt></a> or
<a class="reference internal" href="functions.html#long" title="long"><tt class="xref py py-class docutils literal"><span class="pre">long</span></tt></a>).</p>
<p>There are some small differences between arithmetic on Decimal objects and
arithmetic on integers and floats.  When the remainder operator <tt class="docutils literal"><span class="pre">%</span></tt> is
applied to Decimal objects, the sign of the result is the sign of the
<em>dividend</em> rather than the sign of the divisor:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="p">(</span><span class="o">-</span><span class="mi">7</span><span class="p">)</span> <span class="o">%</span> <span class="mi">4</span>
<span class="go">1</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="o">-</span><span class="mi">7</span><span class="p">)</span> <span class="o">%</span> <span class="n">Decimal</span><span class="p">(</span><span class="mi">4</span><span class="p">)</span>
<span class="go">Decimal(&#39;-3&#39;)</span>
</pre></div>
</div>
<p>The integer division operator <tt class="docutils literal"><span class="pre">//</span></tt> behaves analogously, returning the
integer part of the true quotient (truncating towards zero) rather than its
floor, so as to preserve the usual identity <tt class="docutils literal"><span class="pre">x</span> <span class="pre">==</span> <span class="pre">(x</span> <span class="pre">//</span> <span class="pre">y)</span> <span class="pre">*</span> <span class="pre">y</span> <span class="pre">+</span> <span class="pre">x</span> <span class="pre">%</span> <span class="pre">y</span></tt>:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="o">-</span><span class="mi">7</span> <span class="o">//</span> <span class="mi">4</span>
<span class="go">-2</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="o">-</span><span class="mi">7</span><span class="p">)</span> <span class="o">//</span> <span class="n">Decimal</span><span class="p">(</span><span class="mi">4</span><span class="p">)</span>
<span class="go">Decimal(&#39;-1&#39;)</span>
</pre></div>
</div>
<p>The <tt class="docutils literal"><span class="pre">%</span></tt> and <tt class="docutils literal"><span class="pre">//</span></tt> operators implement the <tt class="docutils literal"><span class="pre">remainder</span></tt> and
<tt class="docutils literal"><span class="pre">divide-integer</span></tt> operations (respectively) as described in the
specification.</p>
<p>Decimal objects cannot generally be combined with floats in
arithmetic operations: an attempt to add a <a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a> to a
<a class="reference internal" href="functions.html#float" title="float"><tt class="xref py py-class docutils literal"><span class="pre">float</span></tt></a>, for example, will raise a <a class="reference internal" href="exceptions.html#exceptions.TypeError" title="exceptions.TypeError"><tt class="xref py py-exc docutils literal"><span class="pre">TypeError</span></tt></a>.
There&#8217;s one exception to this rule: it&#8217;s possible to use Python&#8217;s
comparison operators to compare a <a class="reference internal" href="functions.html#float" title="float"><tt class="xref py py-class docutils literal"><span class="pre">float</span></tt></a> instance <tt class="docutils literal"><span class="pre">x</span></tt>
with a <a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a> instance <tt class="docutils literal"><span class="pre">y</span></tt>.  Without this exception,
comparisons between <a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a> and <a class="reference internal" href="functions.html#float" title="float"><tt class="xref py py-class docutils literal"><span class="pre">float</span></tt></a> instances
would follow the general rules for comparing objects of different
types described in the <a class="reference internal" href="../reference/expressions.html#expressions"><em>Expressions</em></a> section of the reference
manual, leading to confusing results.</p>
<p class="versionchanged">
<span class="versionmodified">Changed in version 2.7: </span>A comparison between a <a class="reference internal" href="functions.html#float" title="float"><tt class="xref py py-class docutils literal"><span class="pre">float</span></tt></a> instance <tt class="docutils literal"><span class="pre">x</span></tt> and a
<a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a> instance <tt class="docutils literal"><span class="pre">y</span></tt> now returns a result based on
the values of <tt class="docutils literal"><span class="pre">x</span></tt> and <tt class="docutils literal"><span class="pre">y</span></tt>.  In earlier versions <tt class="docutils literal"><span class="pre">x</span> <span class="pre">&lt;</span> <span class="pre">y</span></tt>
returned the same (arbitrary) result for any <a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a>
instance <tt class="docutils literal"><span class="pre">x</span></tt> and any <a class="reference internal" href="functions.html#float" title="float"><tt class="xref py py-class docutils literal"><span class="pre">float</span></tt></a> instance <tt class="docutils literal"><span class="pre">y</span></tt>.</p>
<p>In addition to the standard numeric properties, decimal floating point
objects also have a number of specialized methods:</p>
<dl class="method">
<dt id="decimal.Decimal.adjusted">
<tt class="descname">adjusted</tt><big>(</big><big>)</big><a class="headerlink" href="#decimal.Decimal.adjusted" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the adjusted exponent after shifting out the coefficient&#8217;s
rightmost digits until only the lead digit remains:
<tt class="docutils literal"><span class="pre">Decimal('321e+5').adjusted()</span></tt> returns seven.  Used for determining the
position of the most significant digit with respect to the decimal point.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.as_tuple">
<tt class="descname">as_tuple</tt><big>(</big><big>)</big><a class="headerlink" href="#decimal.Decimal.as_tuple" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a <a class="reference internal" href="../glossary.html#term-named-tuple"><em class="xref std std-term">named tuple</em></a> representation of the number:
<tt class="docutils literal"><span class="pre">DecimalTuple(sign,</span> <span class="pre">digits,</span> <span class="pre">exponent)</span></tt>.</p>
<p class="versionchanged">
<span class="versionmodified">Changed in version 2.6: </span>Use a named tuple.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.canonical">
<tt class="descname">canonical</tt><big>(</big><big>)</big><a class="headerlink" href="#decimal.Decimal.canonical" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the canonical encoding of the argument.  Currently, the encoding of
a <a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a> instance is always canonical, so this operation returns
its argument unchanged.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.compare">
<tt class="descname">compare</tt><big>(</big><em>other</em><span class="optional">[</span>, <em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.compare" title="Permalink to this definition">¶</a></dt>
<dd><p>Compare the values of two Decimal instances.  This operation behaves in
the same way as the usual comparison method <a class="reference internal" href="../reference/datamodel.html#object.__cmp__" title="object.__cmp__"><tt class="xref py py-meth docutils literal"><span class="pre">__cmp__()</span></tt></a>, except that
<a class="reference internal" href="#decimal.Decimal.compare" title="decimal.Decimal.compare"><tt class="xref py py-meth docutils literal"><span class="pre">compare()</span></tt></a> returns a Decimal instance rather than an integer, and if
either operand is a NaN then the result is a NaN:</p>
<div class="highlight-python"><pre>a or b is a NaN ==&gt; Decimal('NaN')
a &lt; b           ==&gt; Decimal('-1')
a == b          ==&gt; Decimal('0')
a &gt; b           ==&gt; Decimal('1')</pre>
</div>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.compare_signal">
<tt class="descname">compare_signal</tt><big>(</big><em>other</em><span class="optional">[</span>, <em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.compare_signal" title="Permalink to this definition">¶</a></dt>
<dd><p>This operation is identical to the <a class="reference internal" href="#decimal.Decimal.compare" title="decimal.Decimal.compare"><tt class="xref py py-meth docutils literal"><span class="pre">compare()</span></tt></a> method, except that all
NaNs signal.  That is, if neither operand is a signaling NaN then any
quiet NaN operand is treated as though it were a signaling NaN.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.compare_total">
<tt class="descname">compare_total</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#decimal.Decimal.compare_total" title="Permalink to this definition">¶</a></dt>
<dd><p>Compare two operands using their abstract representation rather than their
numerical value.  Similar to the <a class="reference internal" href="#decimal.Decimal.compare" title="decimal.Decimal.compare"><tt class="xref py py-meth docutils literal"><span class="pre">compare()</span></tt></a> method, but the result
gives a total ordering on <a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a> instances.  Two
<a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a> instances with the same numeric value but different
representations compare unequal in this ordering:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;12.0&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">compare_total</span><span class="p">(</span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;12&#39;</span><span class="p">))</span>
<span class="go">Decimal(&#39;-1&#39;)</span>
</pre></div>
</div>
<p>Quiet and signaling NaNs are also included in the total ordering.  The
result of this function is <tt class="docutils literal"><span class="pre">Decimal('0')</span></tt> if both operands have the same
representation, <tt class="docutils literal"><span class="pre">Decimal('-1')</span></tt> if the first operand is lower in the
total order than the second, and <tt class="docutils literal"><span class="pre">Decimal('1')</span></tt> if the first operand is
higher in the total order than the second operand.  See the specification
for details of the total order.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.compare_total_mag">
<tt class="descname">compare_total_mag</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#decimal.Decimal.compare_total_mag" title="Permalink to this definition">¶</a></dt>
<dd><p>Compare two operands using their abstract representation rather than their
value as in <a class="reference internal" href="#decimal.Decimal.compare_total" title="decimal.Decimal.compare_total"><tt class="xref py py-meth docutils literal"><span class="pre">compare_total()</span></tt></a>, but ignoring the sign of each operand.
<tt class="docutils literal"><span class="pre">x.compare_total_mag(y)</span></tt> is equivalent to
<tt class="docutils literal"><span class="pre">x.copy_abs().compare_total(y.copy_abs())</span></tt>.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.conjugate">
<tt class="descname">conjugate</tt><big>(</big><big>)</big><a class="headerlink" href="#decimal.Decimal.conjugate" title="Permalink to this definition">¶</a></dt>
<dd><p>Just returns self, this method is only to comply with the Decimal
Specification.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.copy_abs">
<tt class="descname">copy_abs</tt><big>(</big><big>)</big><a class="headerlink" href="#decimal.Decimal.copy_abs" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the absolute value of the argument.  This operation is unaffected
by the context and is quiet: no flags are changed and no rounding is
performed.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.copy_negate">
<tt class="descname">copy_negate</tt><big>(</big><big>)</big><a class="headerlink" href="#decimal.Decimal.copy_negate" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the negation of the argument.  This operation is unaffected by the
context and is quiet: no flags are changed and no rounding is performed.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.copy_sign">
<tt class="descname">copy_sign</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#decimal.Decimal.copy_sign" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a copy of the first operand with the sign set to be the same as the
sign of the second operand.  For example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;2.3&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">copy_sign</span><span class="p">(</span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;-1.5&#39;</span><span class="p">))</span>
<span class="go">Decimal(&#39;-2.3&#39;)</span>
</pre></div>
</div>
<p>This operation is unaffected by the context and is quiet: no flags are
changed and no rounding is performed.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.exp">
<tt class="descname">exp</tt><big>(</big><span class="optional">[</span><em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.exp" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the value of the (natural) exponential function <tt class="docutils literal"><span class="pre">e**x</span></tt> at the
given number.  The result is correctly rounded using the
<tt class="xref py py-const docutils literal"><span class="pre">ROUND_HALF_EVEN</span></tt> rounding mode.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span><span class="o">.</span><span class="n">exp</span><span class="p">()</span>
<span class="go">Decimal(&#39;2.718281828459045235360287471&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="mi">321</span><span class="p">)</span><span class="o">.</span><span class="n">exp</span><span class="p">()</span>
<span class="go">Decimal(&#39;2.561702493119680037517373933E+139&#39;)</span>
</pre></div>
</div>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.from_float">
<tt class="descname">from_float</tt><big>(</big><em>f</em><big>)</big><a class="headerlink" href="#decimal.Decimal.from_float" title="Permalink to this definition">¶</a></dt>
<dd><p>Classmethod that converts a float to a decimal number, exactly.</p>
<p>Note <cite>Decimal.from_float(0.1)</cite> is not the same as <cite>Decimal(&#8216;0.1&#8217;)</cite>.
Since 0.1 is not exactly representable in binary floating point, the
value is stored as the nearest representable value which is
<cite>0x1.999999999999ap-4</cite>.  That equivalent value in decimal is
<cite>0.1000000000000000055511151231257827021181583404541015625</cite>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">From Python 2.7 onwards, a <a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a> instance
can also be constructed directly from a <a class="reference internal" href="functions.html#float" title="float"><tt class="xref py py-class docutils literal"><span class="pre">float</span></tt></a>.</p>
</div>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="o">.</span><span class="n">from_float</span><span class="p">(</span><span class="mf">0.1</span><span class="p">)</span>
<span class="go">Decimal(&#39;0.1000000000000000055511151231257827021181583404541015625&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="o">.</span><span class="n">from_float</span><span class="p">(</span><span class="nb">float</span><span class="p">(</span><span class="s">&#39;nan&#39;</span><span class="p">))</span>
<span class="go">Decimal(&#39;NaN&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="o">.</span><span class="n">from_float</span><span class="p">(</span><span class="nb">float</span><span class="p">(</span><span class="s">&#39;inf&#39;</span><span class="p">))</span>
<span class="go">Decimal(&#39;Infinity&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="o">.</span><span class="n">from_float</span><span class="p">(</span><span class="nb">float</span><span class="p">(</span><span class="s">&#39;-inf&#39;</span><span class="p">))</span>
<span class="go">Decimal(&#39;-Infinity&#39;)</span>
</pre></div>
</div>
<p class="versionadded">
<span class="versionmodified">New in version 2.7.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.fma">
<tt class="descname">fma</tt><big>(</big><em>other</em>, <em>third</em><span class="optional">[</span>, <em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.fma" title="Permalink to this definition">¶</a></dt>
<dd><p>Fused multiply-add.  Return self*other+third with no rounding of the
intermediate product self*other.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span><span class="o">.</span><span class="n">fma</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span> <span class="mi">5</span><span class="p">)</span>
<span class="go">Decimal(&#39;11&#39;)</span>
</pre></div>
</div>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.is_canonical">
<tt class="descname">is_canonical</tt><big>(</big><big>)</big><a class="headerlink" href="#decimal.Decimal.is_canonical" title="Permalink to this definition">¶</a></dt>
<dd><p>Return <a class="reference internal" href="constants.html#True" title="True"><tt class="xref py py-const docutils literal"><span class="pre">True</span></tt></a> if the argument is canonical and <a class="reference internal" href="constants.html#False" title="False"><tt class="xref py py-const docutils literal"><span class="pre">False</span></tt></a>
otherwise.  Currently, a <a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a> instance is always canonical, so
this operation always returns <a class="reference internal" href="constants.html#True" title="True"><tt class="xref py py-const docutils literal"><span class="pre">True</span></tt></a>.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.is_finite">
<tt class="descname">is_finite</tt><big>(</big><big>)</big><a class="headerlink" href="#decimal.Decimal.is_finite" title="Permalink to this definition">¶</a></dt>
<dd><p>Return <a class="reference internal" href="constants.html#True" title="True"><tt class="xref py py-const docutils literal"><span class="pre">True</span></tt></a> if the argument is a finite number, and
<a class="reference internal" href="constants.html#False" title="False"><tt class="xref py py-const docutils literal"><span class="pre">False</span></tt></a> if the argument is an infinity or a NaN.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.is_infinite">
<tt class="descname">is_infinite</tt><big>(</big><big>)</big><a class="headerlink" href="#decimal.Decimal.is_infinite" title="Permalink to this definition">¶</a></dt>
<dd><p>Return <a class="reference internal" href="constants.html#True" title="True"><tt class="xref py py-const docutils literal"><span class="pre">True</span></tt></a> if the argument is either positive or negative
infinity and <a class="reference internal" href="constants.html#False" title="False"><tt class="xref py py-const docutils literal"><span class="pre">False</span></tt></a> otherwise.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.is_nan">
<tt class="descname">is_nan</tt><big>(</big><big>)</big><a class="headerlink" href="#decimal.Decimal.is_nan" title="Permalink to this definition">¶</a></dt>
<dd><p>Return <a class="reference internal" href="constants.html#True" title="True"><tt class="xref py py-const docutils literal"><span class="pre">True</span></tt></a> if the argument is a (quiet or signaling) NaN and
<a class="reference internal" href="constants.html#False" title="False"><tt class="xref py py-const docutils literal"><span class="pre">False</span></tt></a> otherwise.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.is_normal">
<tt class="descname">is_normal</tt><big>(</big><big>)</big><a class="headerlink" href="#decimal.Decimal.is_normal" title="Permalink to this definition">¶</a></dt>
<dd><p>Return <a class="reference internal" href="constants.html#True" title="True"><tt class="xref py py-const docutils literal"><span class="pre">True</span></tt></a> if the argument is a <em>normal</em> finite non-zero
number with an adjusted exponent greater than or equal to <em>Emin</em>.
Return <a class="reference internal" href="constants.html#False" title="False"><tt class="xref py py-const docutils literal"><span class="pre">False</span></tt></a> if the argument is zero, subnormal, infinite or a
NaN.  Note, the term <em>normal</em> is used here in a different sense with
the <a class="reference internal" href="#decimal.Decimal.normalize" title="decimal.Decimal.normalize"><tt class="xref py py-meth docutils literal"><span class="pre">normalize()</span></tt></a> method which is used to create canonical values.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.is_qnan">
<tt class="descname">is_qnan</tt><big>(</big><big>)</big><a class="headerlink" href="#decimal.Decimal.is_qnan" title="Permalink to this definition">¶</a></dt>
<dd><p>Return <a class="reference internal" href="constants.html#True" title="True"><tt class="xref py py-const docutils literal"><span class="pre">True</span></tt></a> if the argument is a quiet NaN, and
<a class="reference internal" href="constants.html#False" title="False"><tt class="xref py py-const docutils literal"><span class="pre">False</span></tt></a> otherwise.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.is_signed">
<tt class="descname">is_signed</tt><big>(</big><big>)</big><a class="headerlink" href="#decimal.Decimal.is_signed" title="Permalink to this definition">¶</a></dt>
<dd><p>Return <a class="reference internal" href="constants.html#True" title="True"><tt class="xref py py-const docutils literal"><span class="pre">True</span></tt></a> if the argument has a negative sign and
<a class="reference internal" href="constants.html#False" title="False"><tt class="xref py py-const docutils literal"><span class="pre">False</span></tt></a> otherwise.  Note that zeros and NaNs can both carry signs.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.is_snan">
<tt class="descname">is_snan</tt><big>(</big><big>)</big><a class="headerlink" href="#decimal.Decimal.is_snan" title="Permalink to this definition">¶</a></dt>
<dd><p>Return <a class="reference internal" href="constants.html#True" title="True"><tt class="xref py py-const docutils literal"><span class="pre">True</span></tt></a> if the argument is a signaling NaN and <a class="reference internal" href="constants.html#False" title="False"><tt class="xref py py-const docutils literal"><span class="pre">False</span></tt></a>
otherwise.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.is_subnormal">
<tt class="descname">is_subnormal</tt><big>(</big><big>)</big><a class="headerlink" href="#decimal.Decimal.is_subnormal" title="Permalink to this definition">¶</a></dt>
<dd><p>Return <a class="reference internal" href="constants.html#True" title="True"><tt class="xref py py-const docutils literal"><span class="pre">True</span></tt></a> if the argument is subnormal, and <a class="reference internal" href="constants.html#False" title="False"><tt class="xref py py-const docutils literal"><span class="pre">False</span></tt></a>
otherwise. A number is subnormal is if it is nonzero, finite, and has an
adjusted exponent less than <em>Emin</em>.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.is_zero">
<tt class="descname">is_zero</tt><big>(</big><big>)</big><a class="headerlink" href="#decimal.Decimal.is_zero" title="Permalink to this definition">¶</a></dt>
<dd><p>Return <a class="reference internal" href="constants.html#True" title="True"><tt class="xref py py-const docutils literal"><span class="pre">True</span></tt></a> if the argument is a (positive or negative) zero and
<a class="reference internal" href="constants.html#False" title="False"><tt class="xref py py-const docutils literal"><span class="pre">False</span></tt></a> otherwise.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.ln">
<tt class="descname">ln</tt><big>(</big><span class="optional">[</span><em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.ln" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the natural (base e) logarithm of the operand.  The result is
correctly rounded using the <tt class="xref py py-const docutils literal"><span class="pre">ROUND_HALF_EVEN</span></tt> rounding mode.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.log10">
<tt class="descname">log10</tt><big>(</big><span class="optional">[</span><em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.log10" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the base ten logarithm of the operand.  The result is correctly
rounded using the <tt class="xref py py-const docutils literal"><span class="pre">ROUND_HALF_EVEN</span></tt> rounding mode.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.logb">
<tt class="descname">logb</tt><big>(</big><span class="optional">[</span><em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.logb" title="Permalink to this definition">¶</a></dt>
<dd><p>For a nonzero number, return the adjusted exponent of its operand as a
<a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a> instance.  If the operand is a zero then
<tt class="docutils literal"><span class="pre">Decimal('-Infinity')</span></tt> is returned and the <a class="reference internal" href="#decimal.DivisionByZero" title="decimal.DivisionByZero"><tt class="xref py py-const docutils literal"><span class="pre">DivisionByZero</span></tt></a> flag
is raised.  If the operand is an infinity then <tt class="docutils literal"><span class="pre">Decimal('Infinity')</span></tt> is
returned.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.logical_and">
<tt class="descname">logical_and</tt><big>(</big><em>other</em><span class="optional">[</span>, <em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.logical_and" title="Permalink to this definition">¶</a></dt>
<dd><p><a class="reference internal" href="#decimal.Decimal.logical_and" title="decimal.Decimal.logical_and"><tt class="xref py py-meth docutils literal"><span class="pre">logical_and()</span></tt></a> is a logical operation which takes two <em>logical
operands</em> (see <a class="reference internal" href="#logical-operands-label"><em>Logical operands</em></a>).  The result is the
digit-wise <tt class="docutils literal"><span class="pre">and</span></tt> of the two operands.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.logical_invert">
<tt class="descname">logical_invert</tt><big>(</big><span class="optional">[</span><em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.logical_invert" title="Permalink to this definition">¶</a></dt>
<dd><p><a class="reference internal" href="#decimal.Decimal.logical_invert" title="decimal.Decimal.logical_invert"><tt class="xref py py-meth docutils literal"><span class="pre">logical_invert()</span></tt></a> is a logical operation.  The
result is the digit-wise inversion of the operand.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.logical_or">
<tt class="descname">logical_or</tt><big>(</big><em>other</em><span class="optional">[</span>, <em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.logical_or" title="Permalink to this definition">¶</a></dt>
<dd><p><a class="reference internal" href="#decimal.Decimal.logical_or" title="decimal.Decimal.logical_or"><tt class="xref py py-meth docutils literal"><span class="pre">logical_or()</span></tt></a> is a logical operation which takes two <em>logical
operands</em> (see <a class="reference internal" href="#logical-operands-label"><em>Logical operands</em></a>).  The result is the
digit-wise <tt class="docutils literal"><span class="pre">or</span></tt> of the two operands.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.logical_xor">
<tt class="descname">logical_xor</tt><big>(</big><em>other</em><span class="optional">[</span>, <em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.logical_xor" title="Permalink to this definition">¶</a></dt>
<dd><p><a class="reference internal" href="#decimal.Decimal.logical_xor" title="decimal.Decimal.logical_xor"><tt class="xref py py-meth docutils literal"><span class="pre">logical_xor()</span></tt></a> is a logical operation which takes two <em>logical
operands</em> (see <a class="reference internal" href="#logical-operands-label"><em>Logical operands</em></a>).  The result is the
digit-wise exclusive or of the two operands.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.max">
<tt class="descname">max</tt><big>(</big><em>other</em><span class="optional">[</span>, <em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.max" title="Permalink to this definition">¶</a></dt>
<dd><p>Like <tt class="docutils literal"><span class="pre">max(self,</span> <span class="pre">other)</span></tt> except that the context rounding rule is applied
before returning and that <tt class="xref py py-const docutils literal"><span class="pre">NaN</span></tt> values are either signaled or
ignored (depending on the context and whether they are signaling or
quiet).</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.max_mag">
<tt class="descname">max_mag</tt><big>(</big><em>other</em><span class="optional">[</span>, <em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.max_mag" title="Permalink to this definition">¶</a></dt>
<dd><p>Similar to the <a class="reference internal" href="#decimal.Decimal.max" title="decimal.Decimal.max"><tt class="xref py py-meth docutils literal"><span class="pre">max()</span></tt></a> method, but the comparison is done using the
absolute values of the operands.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.min">
<tt class="descname">min</tt><big>(</big><em>other</em><span class="optional">[</span>, <em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.min" title="Permalink to this definition">¶</a></dt>
<dd><p>Like <tt class="docutils literal"><span class="pre">min(self,</span> <span class="pre">other)</span></tt> except that the context rounding rule is applied
before returning and that <tt class="xref py py-const docutils literal"><span class="pre">NaN</span></tt> values are either signaled or
ignored (depending on the context and whether they are signaling or
quiet).</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.min_mag">
<tt class="descname">min_mag</tt><big>(</big><em>other</em><span class="optional">[</span>, <em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.min_mag" title="Permalink to this definition">¶</a></dt>
<dd><p>Similar to the <a class="reference internal" href="#decimal.Decimal.min" title="decimal.Decimal.min"><tt class="xref py py-meth docutils literal"><span class="pre">min()</span></tt></a> method, but the comparison is done using the
absolute values of the operands.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.next_minus">
<tt class="descname">next_minus</tt><big>(</big><span class="optional">[</span><em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.next_minus" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the largest number representable in the given context (or in the
current thread&#8217;s context if no context is given) that is smaller than the
given operand.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.next_plus">
<tt class="descname">next_plus</tt><big>(</big><span class="optional">[</span><em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.next_plus" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the smallest number representable in the given context (or in the
current thread&#8217;s context if no context is given) that is larger than the
given operand.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.next_toward">
<tt class="descname">next_toward</tt><big>(</big><em>other</em><span class="optional">[</span>, <em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.next_toward" title="Permalink to this definition">¶</a></dt>
<dd><p>If the two operands are unequal, return the number closest to the first
operand in the direction of the second operand.  If both operands are
numerically equal, return a copy of the first operand with the sign set to
be the same as the sign of the second operand.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.normalize">
<tt class="descname">normalize</tt><big>(</big><span class="optional">[</span><em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.normalize" title="Permalink to this definition">¶</a></dt>
<dd><p>Normalize the number by stripping the rightmost trailing zeros and
converting any result equal to <tt class="xref py py-const docutils literal"><span class="pre">Decimal('0')</span></tt> to
<tt class="xref py py-const docutils literal"><span class="pre">Decimal('0e0')</span></tt>. Used for producing canonical values for attributes
of an equivalence class. For example, <tt class="docutils literal"><span class="pre">Decimal('32.100')</span></tt> and
<tt class="docutils literal"><span class="pre">Decimal('0.321000e+2')</span></tt> both normalize to the equivalent value
<tt class="docutils literal"><span class="pre">Decimal('32.1')</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.number_class">
<tt class="descname">number_class</tt><big>(</big><span class="optional">[</span><em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.number_class" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a string describing the <em>class</em> of the operand.  The returned value
is one of the following ten strings.</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">&quot;-Infinity&quot;</span></tt>, indicating that the operand is negative infinity.</li>
<li><tt class="docutils literal"><span class="pre">&quot;-Normal&quot;</span></tt>, indicating that the operand is a negative normal number.</li>
<li><tt class="docutils literal"><span class="pre">&quot;-Subnormal&quot;</span></tt>, indicating that the operand is negative and subnormal.</li>
<li><tt class="docutils literal"><span class="pre">&quot;-Zero&quot;</span></tt>, indicating that the operand is a negative zero.</li>
<li><tt class="docutils literal"><span class="pre">&quot;+Zero&quot;</span></tt>, indicating that the operand is a positive zero.</li>
<li><tt class="docutils literal"><span class="pre">&quot;+Subnormal&quot;</span></tt>, indicating that the operand is positive and subnormal.</li>
<li><tt class="docutils literal"><span class="pre">&quot;+Normal&quot;</span></tt>, indicating that the operand is a positive normal number.</li>
<li><tt class="docutils literal"><span class="pre">&quot;+Infinity&quot;</span></tt>, indicating that the operand is positive infinity.</li>
<li><tt class="docutils literal"><span class="pre">&quot;NaN&quot;</span></tt>, indicating that the operand is a quiet NaN (Not a Number).</li>
<li><tt class="docutils literal"><span class="pre">&quot;sNaN&quot;</span></tt>, indicating that the operand is a signaling NaN.</li>
</ul>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.quantize">
<tt class="descname">quantize</tt><big>(</big><em>exp</em><span class="optional">[</span>, <em>rounding</em><span class="optional">[</span>, <em>context</em><span class="optional">[</span>, <em>watchexp</em><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.quantize" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a value equal to the first operand after rounding and having the
exponent of the second operand.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;1.41421356&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">quantize</span><span class="p">(</span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;1.000&#39;</span><span class="p">))</span>
<span class="go">Decimal(&#39;1.414&#39;)</span>
</pre></div>
</div>
<p>Unlike other operations, if the length of the coefficient after the
quantize operation would be greater than precision, then an
<a class="reference internal" href="#decimal.InvalidOperation" title="decimal.InvalidOperation"><tt class="xref py py-const docutils literal"><span class="pre">InvalidOperation</span></tt></a> is signaled. This guarantees that, unless there
is an error condition, the quantized exponent is always equal to that of
the right-hand operand.</p>
<p>Also unlike other operations, quantize never signals Underflow, even if
the result is subnormal and inexact.</p>
<p>If the exponent of the second operand is larger than that of the first
then rounding may be necessary.  In this case, the rounding mode is
determined by the <tt class="docutils literal"><span class="pre">rounding</span></tt> argument if given, else by the given
<tt class="docutils literal"><span class="pre">context</span></tt> argument; if neither argument is given the rounding mode of
the current thread&#8217;s context is used.</p>
<p>If <em>watchexp</em> is set (default), then an error is returned whenever the
resulting exponent is greater than <tt class="xref py py-attr docutils literal"><span class="pre">Emax</span></tt> or less than
<tt class="xref py py-attr docutils literal"><span class="pre">Etiny</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.radix">
<tt class="descname">radix</tt><big>(</big><big>)</big><a class="headerlink" href="#decimal.Decimal.radix" title="Permalink to this definition">¶</a></dt>
<dd><p>Return <tt class="docutils literal"><span class="pre">Decimal(10)</span></tt>, the radix (base) in which the <a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a>
class does all its arithmetic.  Included for compatibility with the
specification.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.remainder_near">
<tt class="descname">remainder_near</tt><big>(</big><em>other</em><span class="optional">[</span>, <em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.remainder_near" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the remainder from dividing <em>self</em> by <em>other</em>.  This differs from
<tt class="docutils literal"><span class="pre">self</span> <span class="pre">%</span> <span class="pre">other</span></tt> in that the sign of the remainder is chosen so as to
minimize its absolute value.  More precisely, the return value is
<tt class="docutils literal"><span class="pre">self</span> <span class="pre">-</span> <span class="pre">n</span> <span class="pre">*</span> <span class="pre">other</span></tt> where <tt class="docutils literal"><span class="pre">n</span></tt> is the integer nearest to the exact
value of <tt class="docutils literal"><span class="pre">self</span> <span class="pre">/</span> <span class="pre">other</span></tt>, and if two integers are equally near then the
even one is chosen.</p>
<p>If the result is zero then its sign will be the sign of <em>self</em>.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="mi">18</span><span class="p">)</span><span class="o">.</span><span class="n">remainder_near</span><span class="p">(</span><span class="n">Decimal</span><span class="p">(</span><span class="mi">10</span><span class="p">))</span>
<span class="go">Decimal(&#39;-2&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="mi">25</span><span class="p">)</span><span class="o">.</span><span class="n">remainder_near</span><span class="p">(</span><span class="n">Decimal</span><span class="p">(</span><span class="mi">10</span><span class="p">))</span>
<span class="go">Decimal(&#39;5&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="mi">35</span><span class="p">)</span><span class="o">.</span><span class="n">remainder_near</span><span class="p">(</span><span class="n">Decimal</span><span class="p">(</span><span class="mi">10</span><span class="p">))</span>
<span class="go">Decimal(&#39;-5&#39;)</span>
</pre></div>
</div>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.rotate">
<tt class="descname">rotate</tt><big>(</big><em>other</em><span class="optional">[</span>, <em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.rotate" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the result of rotating the digits of the first operand by an amount
specified by the second operand.  The second operand must be an integer in
the range -precision through precision.  The absolute value of the second
operand gives the number of places to rotate.  If the second operand is
positive then rotation is to the left; otherwise rotation is to the right.
The coefficient of the first operand is padded on the left with zeros to
length precision if necessary.  The sign and exponent of the first operand
are unchanged.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.same_quantum">
<tt class="descname">same_quantum</tt><big>(</big><em>other</em><span class="optional">[</span>, <em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.same_quantum" title="Permalink to this definition">¶</a></dt>
<dd><p>Test whether self and other have the same exponent or whether both are
<tt class="xref py py-const docutils literal"><span class="pre">NaN</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.scaleb">
<tt class="descname">scaleb</tt><big>(</big><em>other</em><span class="optional">[</span>, <em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.scaleb" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the first operand with exponent adjusted by the second.
Equivalently, return the first operand multiplied by <tt class="docutils literal"><span class="pre">10**other</span></tt>.  The
second operand must be an integer.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.shift">
<tt class="descname">shift</tt><big>(</big><em>other</em><span class="optional">[</span>, <em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.shift" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the result of shifting the digits of the first operand by an amount
specified by the second operand.  The second operand must be an integer in
the range -precision through precision.  The absolute value of the second
operand gives the number of places to shift.  If the second operand is
positive then the shift is to the left; otherwise the shift is to the
right.  Digits shifted into the coefficient are zeros.  The sign and
exponent of the first operand are unchanged.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.sqrt">
<tt class="descname">sqrt</tt><big>(</big><span class="optional">[</span><em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.sqrt" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the square root of the argument to full precision.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.to_eng_string">
<tt class="descname">to_eng_string</tt><big>(</big><span class="optional">[</span><em>context</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.to_eng_string" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert to an engineering-type string.</p>
<p>Engineering notation has an exponent which is a multiple of 3, so there
are up to 3 digits left of the decimal place.  For example, converts
<tt class="docutils literal"><span class="pre">Decimal('123E+1')</span></tt> to <tt class="docutils literal"><span class="pre">Decimal('1.23E+3')</span></tt></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.to_integral">
<tt class="descname">to_integral</tt><big>(</big><span class="optional">[</span><em>rounding</em><span class="optional">[</span>, <em>context</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.to_integral" title="Permalink to this definition">¶</a></dt>
<dd><p>Identical to the <a class="reference internal" href="#decimal.Decimal.to_integral_value" title="decimal.Decimal.to_integral_value"><tt class="xref py py-meth docutils literal"><span class="pre">to_integral_value()</span></tt></a> method.  The <tt class="docutils literal"><span class="pre">to_integral</span></tt>
name has been kept for compatibility with older versions.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.to_integral_exact">
<tt class="descname">to_integral_exact</tt><big>(</big><span class="optional">[</span><em>rounding</em><span class="optional">[</span>, <em>context</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.to_integral_exact" title="Permalink to this definition">¶</a></dt>
<dd><p>Round to the nearest integer, signaling <a class="reference internal" href="#decimal.Inexact" title="decimal.Inexact"><tt class="xref py py-const docutils literal"><span class="pre">Inexact</span></tt></a> or
<a class="reference internal" href="#decimal.Rounded" title="decimal.Rounded"><tt class="xref py py-const docutils literal"><span class="pre">Rounded</span></tt></a> as appropriate if rounding occurs.  The rounding mode is
determined by the <tt class="docutils literal"><span class="pre">rounding</span></tt> parameter if given, else by the given
<tt class="docutils literal"><span class="pre">context</span></tt>.  If neither parameter is given then the rounding mode of the
current context is used.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.6.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Decimal.to_integral_value">
<tt class="descname">to_integral_value</tt><big>(</big><span class="optional">[</span><em>rounding</em><span class="optional">[</span>, <em>context</em><span class="optional">]</span><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Decimal.to_integral_value" title="Permalink to this definition">¶</a></dt>
<dd><p>Round to the nearest integer without signaling <a class="reference internal" href="#decimal.Inexact" title="decimal.Inexact"><tt class="xref py py-const docutils literal"><span class="pre">Inexact</span></tt></a> or
<a class="reference internal" href="#decimal.Rounded" title="decimal.Rounded"><tt class="xref py py-const docutils literal"><span class="pre">Rounded</span></tt></a>.  If given, applies <em>rounding</em>; otherwise, uses the
rounding method in either the supplied <em>context</em> or the current context.</p>
<p class="versionchanged">
<span class="versionmodified">Changed in version 2.6: </span>renamed from <tt class="docutils literal"><span class="pre">to_integral</span></tt> to <tt class="docutils literal"><span class="pre">to_integral_value</span></tt>.  The old name
remains valid for compatibility.</p>
</dd></dl>

</dd></dl>

<div class="section" id="logical-operands">
<span id="logical-operands-label"></span><h3>9.4.2.1. Logical operands<a class="headerlink" href="#logical-operands" title="Permalink to this headline">¶</a></h3>
<p>The <tt class="xref py py-meth docutils literal"><span class="pre">logical_and()</span></tt>, <tt class="xref py py-meth docutils literal"><span class="pre">logical_invert()</span></tt>, <tt class="xref py py-meth docutils literal"><span class="pre">logical_or()</span></tt>,
and <tt class="xref py py-meth docutils literal"><span class="pre">logical_xor()</span></tt> methods expect their arguments to be <em>logical
operands</em>.  A <em>logical operand</em> is a <a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a> instance whose
exponent and sign are both zero, and whose digits are all either
<tt class="xref py py-const docutils literal"><span class="pre">0</span></tt> or <tt class="xref py py-const docutils literal"><span class="pre">1</span></tt>.</p>
</div>
</div>
<div class="section" id="context-objects">
<span id="decimal-context"></span><h2>9.4.3. Context objects<a class="headerlink" href="#context-objects" title="Permalink to this headline">¶</a></h2>
<p>Contexts are environments for arithmetic operations.  They govern precision, set
rules for rounding, determine which signals are treated as exceptions, and limit
the range for exponents.</p>
<p>Each thread has its own current context which is accessed or changed using the
<a class="reference internal" href="#decimal.getcontext" title="decimal.getcontext"><tt class="xref py py-func docutils literal"><span class="pre">getcontext()</span></tt></a> and <a class="reference internal" href="#decimal.setcontext" title="decimal.setcontext"><tt class="xref py py-func docutils literal"><span class="pre">setcontext()</span></tt></a> functions:</p>
<dl class="function">
<dt id="decimal.getcontext">
<tt class="descclassname">decimal.</tt><tt class="descname">getcontext</tt><big>(</big><big>)</big><a class="headerlink" href="#decimal.getcontext" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the current context for the active thread.</p>
</dd></dl>

<dl class="function">
<dt id="decimal.setcontext">
<tt class="descclassname">decimal.</tt><tt class="descname">setcontext</tt><big>(</big><em>c</em><big>)</big><a class="headerlink" href="#decimal.setcontext" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the current context for the active thread to <em>c</em>.</p>
</dd></dl>

<p>Beginning with Python 2.5, you can also use the <a class="reference internal" href="../reference/compound_stmts.html#with"><tt class="xref std std-keyword docutils literal"><span class="pre">with</span></tt></a> statement and
the <a class="reference internal" href="#decimal.localcontext" title="decimal.localcontext"><tt class="xref py py-func docutils literal"><span class="pre">localcontext()</span></tt></a> function to temporarily change the active context.</p>
<dl class="function">
<dt id="decimal.localcontext">
<tt class="descclassname">decimal.</tt><tt class="descname">localcontext</tt><big>(</big><span class="optional">[</span><em>c</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.localcontext" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a context manager that will set the current context for the active thread
to a copy of <em>c</em> on entry to the with-statement and restore the previous context
when exiting the with-statement. If no context is specified, a copy of the
current context is used.</p>
<p class="versionadded">
<span class="versionmodified">New in version 2.5.</span></p>
<p>For example, the following code sets the current decimal precision to 42 places,
performs a calculation, and then automatically restores the previous context:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">decimal</span> <span class="kn">import</span> <span class="n">localcontext</span>

<span class="k">with</span> <span class="n">localcontext</span><span class="p">()</span> <span class="k">as</span> <span class="n">ctx</span><span class="p">:</span>
    <span class="n">ctx</span><span class="o">.</span><span class="n">prec</span> <span class="o">=</span> <span class="mi">42</span>   <span class="c"># Perform a high precision calculation</span>
    <span class="n">s</span> <span class="o">=</span> <span class="n">calculate_something</span><span class="p">()</span>
<span class="n">s</span> <span class="o">=</span> <span class="o">+</span><span class="n">s</span>  <span class="c"># Round the final result back to the default precision</span>

<span class="k">with</span> <span class="n">localcontext</span><span class="p">(</span><span class="n">BasicContext</span><span class="p">):</span>      <span class="c"># temporarily use the BasicContext</span>
    <span class="k">print</span> <span class="n">Decimal</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="o">/</span> <span class="n">Decimal</span><span class="p">(</span><span class="mi">7</span><span class="p">)</span>
    <span class="k">print</span> <span class="n">Decimal</span><span class="p">(</span><span class="mi">355</span><span class="p">)</span> <span class="o">/</span> <span class="n">Decimal</span><span class="p">(</span><span class="mi">113</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>

<p>New contexts can also be created using the <a class="reference internal" href="#decimal.Context" title="decimal.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> constructor
described below. In addition, the module provides three pre-made contexts:</p>
<dl class="class">
<dt id="decimal.BasicContext">
<em class="property">class </em><tt class="descclassname">decimal.</tt><tt class="descname">BasicContext</tt><a class="headerlink" href="#decimal.BasicContext" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a standard context defined by the General Decimal Arithmetic
Specification.  Precision is set to nine.  Rounding is set to
<tt class="xref py py-const docutils literal"><span class="pre">ROUND_HALF_UP</span></tt>.  All flags are cleared.  All traps are enabled (treated
as exceptions) except <a class="reference internal" href="#decimal.Inexact" title="decimal.Inexact"><tt class="xref py py-const docutils literal"><span class="pre">Inexact</span></tt></a>, <a class="reference internal" href="#decimal.Rounded" title="decimal.Rounded"><tt class="xref py py-const docutils literal"><span class="pre">Rounded</span></tt></a>, and
<a class="reference internal" href="#decimal.Subnormal" title="decimal.Subnormal"><tt class="xref py py-const docutils literal"><span class="pre">Subnormal</span></tt></a>.</p>
<p>Because many of the traps are enabled, this context is useful for debugging.</p>
</dd></dl>

<dl class="class">
<dt id="decimal.ExtendedContext">
<em class="property">class </em><tt class="descclassname">decimal.</tt><tt class="descname">ExtendedContext</tt><a class="headerlink" href="#decimal.ExtendedContext" title="Permalink to this definition">¶</a></dt>
<dd><p>This is a standard context defined by the General Decimal Arithmetic
Specification.  Precision is set to nine.  Rounding is set to
<tt class="xref py py-const docutils literal"><span class="pre">ROUND_HALF_EVEN</span></tt>.  All flags are cleared.  No traps are enabled (so that
exceptions are not raised during computations).</p>
<p>Because the traps are disabled, this context is useful for applications that
prefer to have result value of <tt class="xref py py-const docutils literal"><span class="pre">NaN</span></tt> or <tt class="xref py py-const docutils literal"><span class="pre">Infinity</span></tt> instead of
raising exceptions.  This allows an application to complete a run in the
presence of conditions that would otherwise halt the program.</p>
</dd></dl>

<dl class="class">
<dt id="decimal.DefaultContext">
<em class="property">class </em><tt class="descclassname">decimal.</tt><tt class="descname">DefaultContext</tt><a class="headerlink" href="#decimal.DefaultContext" title="Permalink to this definition">¶</a></dt>
<dd><p>This context is used by the <a class="reference internal" href="#decimal.Context" title="decimal.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> constructor as a prototype for new
contexts.  Changing a field (such a precision) has the effect of changing the
default for new contexts created by the <a class="reference internal" href="#decimal.Context" title="decimal.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> constructor.</p>
<p>This context is most useful in multi-threaded environments.  Changing one of the
fields before threads are started has the effect of setting system-wide
defaults.  Changing the fields after threads have started is not recommended as
it would require thread synchronization to prevent race conditions.</p>
<p>In single threaded environments, it is preferable to not use this context at
all.  Instead, simply create contexts explicitly as described below.</p>
<p>The default values are precision=28, rounding=ROUND_HALF_EVEN, and enabled traps
for Overflow, InvalidOperation, and DivisionByZero.</p>
</dd></dl>

<p>In addition to the three supplied contexts, new contexts can be created with the
<a class="reference internal" href="#decimal.Context" title="decimal.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> constructor.</p>
<dl class="class">
<dt id="decimal.Context">
<em class="property">class </em><tt class="descclassname">decimal.</tt><tt class="descname">Context</tt><big>(</big><em>prec=None</em>, <em>rounding=None</em>, <em>traps=None</em>, <em>flags=None</em>, <em>Emin=None</em>, <em>Emax=None</em>, <em>capitals=1</em><big>)</big><a class="headerlink" href="#decimal.Context" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a new context.  If a field is not specified or is <a class="reference internal" href="constants.html#None" title="None"><tt class="xref py py-const docutils literal"><span class="pre">None</span></tt></a>, the
default values are copied from the <a class="reference internal" href="#decimal.DefaultContext" title="decimal.DefaultContext"><tt class="xref py py-const docutils literal"><span class="pre">DefaultContext</span></tt></a>.  If the <em>flags</em>
field is not specified or is <a class="reference internal" href="constants.html#None" title="None"><tt class="xref py py-const docutils literal"><span class="pre">None</span></tt></a>, all flags are cleared.</p>
<p>The <em>prec</em> field is a positive integer that sets the precision for arithmetic
operations in the context.</p>
<p>The <em>rounding</em> option is one of:</p>
<ul class="simple">
<li><tt class="xref py py-const docutils literal"><span class="pre">ROUND_CEILING</span></tt> (towards <tt class="xref py py-const docutils literal"><span class="pre">Infinity</span></tt>),</li>
<li><tt class="xref py py-const docutils literal"><span class="pre">ROUND_DOWN</span></tt> (towards zero),</li>
<li><tt class="xref py py-const docutils literal"><span class="pre">ROUND_FLOOR</span></tt> (towards <tt class="xref py py-const docutils literal"><span class="pre">-Infinity</span></tt>),</li>
<li><tt class="xref py py-const docutils literal"><span class="pre">ROUND_HALF_DOWN</span></tt> (to nearest with ties going towards zero),</li>
<li><tt class="xref py py-const docutils literal"><span class="pre">ROUND_HALF_EVEN</span></tt> (to nearest with ties going to nearest even integer),</li>
<li><tt class="xref py py-const docutils literal"><span class="pre">ROUND_HALF_UP</span></tt> (to nearest with ties going away from zero), or</li>
<li><tt class="xref py py-const docutils literal"><span class="pre">ROUND_UP</span></tt> (away from zero).</li>
<li><tt class="xref py py-const docutils literal"><span class="pre">ROUND_05UP</span></tt> (away from zero if last digit after rounding towards zero
would have been 0 or 5; otherwise towards zero)</li>
</ul>
<p>The <em>traps</em> and <em>flags</em> fields list any signals to be set. Generally, new
contexts should only set traps and leave the flags clear.</p>
<p>The <em>Emin</em> and <em>Emax</em> fields are integers specifying the outer limits allowable
for exponents.</p>
<p>The <em>capitals</em> field is either <tt class="xref py py-const docutils literal"><span class="pre">0</span></tt> or <tt class="xref py py-const docutils literal"><span class="pre">1</span></tt> (the default). If set to
<tt class="xref py py-const docutils literal"><span class="pre">1</span></tt>, exponents are printed with a capital <tt class="xref py py-const docutils literal"><span class="pre">E</span></tt>; otherwise, a
lowercase <tt class="xref py py-const docutils literal"><span class="pre">e</span></tt> is used: <tt class="xref py py-const docutils literal"><span class="pre">Decimal('6.02e+23')</span></tt>.</p>
<p class="versionchanged">
<span class="versionmodified">Changed in version 2.6: </span>The <tt class="xref py py-const docutils literal"><span class="pre">ROUND_05UP</span></tt> rounding mode was added.</p>
<p>The <a class="reference internal" href="#decimal.Context" title="decimal.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> class defines several general purpose methods as well as
a large number of methods for doing arithmetic directly in a given context.
In addition, for each of the <a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a> methods described above (with
the exception of the <tt class="xref py py-meth docutils literal"><span class="pre">adjusted()</span></tt> and <tt class="xref py py-meth docutils literal"><span class="pre">as_tuple()</span></tt> methods) there is
a corresponding <a class="reference internal" href="#decimal.Context" title="decimal.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> method.  For example, for a <a class="reference internal" href="#decimal.Context" title="decimal.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a>
instance <tt class="docutils literal"><span class="pre">C</span></tt> and <a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a> instance <tt class="docutils literal"><span class="pre">x</span></tt>, <tt class="docutils literal"><span class="pre">C.exp(x)</span></tt> is
equivalent to <tt class="docutils literal"><span class="pre">x.exp(context=C)</span></tt>.  Each <a class="reference internal" href="#decimal.Context" title="decimal.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> method accepts a
Python integer (an instance of <a class="reference internal" href="functions.html#int" title="int"><tt class="xref py py-class docutils literal"><span class="pre">int</span></tt></a> or <a class="reference internal" href="functions.html#long" title="long"><tt class="xref py py-class docutils literal"><span class="pre">long</span></tt></a>) anywhere that a
Decimal instance is accepted.</p>
<dl class="method">
<dt id="decimal.Context.clear_flags">
<tt class="descname">clear_flags</tt><big>(</big><big>)</big><a class="headerlink" href="#decimal.Context.clear_flags" title="Permalink to this definition">¶</a></dt>
<dd><p>Resets all of the flags to <tt class="xref py py-const docutils literal"><span class="pre">0</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.copy">
<tt class="descname">copy</tt><big>(</big><big>)</big><a class="headerlink" href="#decimal.Context.copy" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a duplicate of the context.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.copy_decimal">
<tt class="descname">copy_decimal</tt><big>(</big><em>num</em><big>)</big><a class="headerlink" href="#decimal.Context.copy_decimal" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a copy of the Decimal instance num.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.create_decimal">
<tt class="descname">create_decimal</tt><big>(</big><em>num</em><big>)</big><a class="headerlink" href="#decimal.Context.create_decimal" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a new Decimal instance from <em>num</em> but using <em>self</em> as
context. Unlike the <a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a> constructor, the context precision,
rounding method, flags, and traps are applied to the conversion.</p>
<p>This is useful because constants are often given to a greater precision
than is needed by the application.  Another benefit is that rounding
immediately eliminates unintended effects from digits beyond the current
precision. In the following example, using unrounded inputs means that
adding zero to a sum can change the result:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">getcontext</span><span class="p">()</span><span class="o">.</span><span class="n">prec</span> <span class="o">=</span> <span class="mi">3</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;3.4445&#39;</span><span class="p">)</span> <span class="o">+</span> <span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;1.0023&#39;</span><span class="p">)</span>
<span class="go">Decimal(&#39;4.45&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;3.4445&#39;</span><span class="p">)</span> <span class="o">+</span> <span class="n">Decimal</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span> <span class="o">+</span> <span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;1.0023&#39;</span><span class="p">)</span>
<span class="go">Decimal(&#39;4.44&#39;)</span>
</pre></div>
</div>
<p>This method implements the to-number operation of the IBM specification.
If the argument is a string, no leading or trailing whitespace is
permitted.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.create_decimal_from_float">
<tt class="descname">create_decimal_from_float</tt><big>(</big><em>f</em><big>)</big><a class="headerlink" href="#decimal.Context.create_decimal_from_float" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a new Decimal instance from a float <em>f</em> but rounding using <em>self</em>
as the context.  Unlike the <a class="reference internal" href="#decimal.Decimal.from_float" title="decimal.Decimal.from_float"><tt class="xref py py-meth docutils literal"><span class="pre">Decimal.from_float()</span></tt></a> class method,
the context precision, rounding method, flags, and traps are applied to
the conversion.</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">context</span> <span class="o">=</span> <span class="n">Context</span><span class="p">(</span><span class="n">prec</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span> <span class="n">rounding</span><span class="o">=</span><span class="n">ROUND_DOWN</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">context</span><span class="o">.</span><span class="n">create_decimal_from_float</span><span class="p">(</span><span class="n">math</span><span class="o">.</span><span class="n">pi</span><span class="p">)</span>
<span class="go">Decimal(&#39;3.1415&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">context</span> <span class="o">=</span> <span class="n">Context</span><span class="p">(</span><span class="n">prec</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span> <span class="n">traps</span><span class="o">=</span><span class="p">[</span><span class="n">Inexact</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">context</span><span class="o">.</span><span class="n">create_decimal_from_float</span><span class="p">(</span><span class="n">math</span><span class="o">.</span><span class="n">pi</span><span class="p">)</span>
<span class="gt">Traceback (most recent call last):</span>
    <span class="o">...</span>
<span class="gr">Inexact</span>: <span class="n">None</span>
</pre></div>
</div>
<p class="versionadded">
<span class="versionmodified">New in version 2.7.</span></p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.Etiny">
<tt class="descname">Etiny</tt><big>(</big><big>)</big><a class="headerlink" href="#decimal.Context.Etiny" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a value equal to <tt class="docutils literal"><span class="pre">Emin</span> <span class="pre">-</span> <span class="pre">prec</span> <span class="pre">+</span> <span class="pre">1</span></tt> which is the minimum exponent
value for subnormal results.  When underflow occurs, the exponent is set
to <a class="reference internal" href="#decimal.Context.Etiny" title="decimal.Context.Etiny"><tt class="xref py py-const docutils literal"><span class="pre">Etiny</span></tt></a>.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.Etop">
<tt class="descname">Etop</tt><big>(</big><big>)</big><a class="headerlink" href="#decimal.Context.Etop" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a value equal to <tt class="docutils literal"><span class="pre">Emax</span> <span class="pre">-</span> <span class="pre">prec</span> <span class="pre">+</span> <span class="pre">1</span></tt>.</p>
</dd></dl>

<p>The usual approach to working with decimals is to create <a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a>
instances and then apply arithmetic operations which take place within the
current context for the active thread.  An alternative approach is to use
context methods for calculating within a specific context.  The methods are
similar to those for the <a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a> class and are only briefly
recounted here.</p>
<dl class="method">
<dt id="decimal.Context.abs">
<tt class="descname">abs</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.abs" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the absolute value of <em>x</em>.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.add">
<tt class="descname">add</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.add" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the sum of <em>x</em> and <em>y</em>.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.canonical">
<tt class="descname">canonical</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.canonical" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the same Decimal object <em>x</em>.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.compare">
<tt class="descname">compare</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.compare" title="Permalink to this definition">¶</a></dt>
<dd><p>Compares <em>x</em> and <em>y</em> numerically.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.compare_signal">
<tt class="descname">compare_signal</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.compare_signal" title="Permalink to this definition">¶</a></dt>
<dd><p>Compares the values of the two operands numerically.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.compare_total">
<tt class="descname">compare_total</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.compare_total" title="Permalink to this definition">¶</a></dt>
<dd><p>Compares two operands using their abstract representation.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.compare_total_mag">
<tt class="descname">compare_total_mag</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.compare_total_mag" title="Permalink to this definition">¶</a></dt>
<dd><p>Compares two operands using their abstract representation, ignoring sign.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.copy_abs">
<tt class="descname">copy_abs</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.copy_abs" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a copy of <em>x</em> with the sign set to 0.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.copy_negate">
<tt class="descname">copy_negate</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.copy_negate" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a copy of <em>x</em> with the sign inverted.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.copy_sign">
<tt class="descname">copy_sign</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.copy_sign" title="Permalink to this definition">¶</a></dt>
<dd><p>Copies the sign from <em>y</em> to <em>x</em>.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.divide">
<tt class="descname">divide</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.divide" title="Permalink to this definition">¶</a></dt>
<dd><p>Return <em>x</em> divided by <em>y</em>.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.divide_int">
<tt class="descname">divide_int</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.divide_int" title="Permalink to this definition">¶</a></dt>
<dd><p>Return <em>x</em> divided by <em>y</em>, truncated to an integer.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.divmod">
<tt class="descname">divmod</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.divmod" title="Permalink to this definition">¶</a></dt>
<dd><p>Divides two numbers and returns the integer part of the result.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.exp">
<tt class="descname">exp</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.exp" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns <cite>e ** x</cite>.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.fma">
<tt class="descname">fma</tt><big>(</big><em>x</em>, <em>y</em>, <em>z</em><big>)</big><a class="headerlink" href="#decimal.Context.fma" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns <em>x</em> multiplied by <em>y</em>, plus <em>z</em>.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.is_canonical">
<tt class="descname">is_canonical</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.is_canonical" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns True if <em>x</em> is canonical; otherwise returns False.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.is_finite">
<tt class="descname">is_finite</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.is_finite" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns True if <em>x</em> is finite; otherwise returns False.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.is_infinite">
<tt class="descname">is_infinite</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.is_infinite" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns True if <em>x</em> is infinite; otherwise returns False.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.is_nan">
<tt class="descname">is_nan</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.is_nan" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns True if <em>x</em> is a qNaN or sNaN; otherwise returns False.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.is_normal">
<tt class="descname">is_normal</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.is_normal" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns True if <em>x</em> is a normal number; otherwise returns False.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.is_qnan">
<tt class="descname">is_qnan</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.is_qnan" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns True if <em>x</em> is a quiet NaN; otherwise returns False.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.is_signed">
<tt class="descname">is_signed</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.is_signed" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns True if <em>x</em> is negative; otherwise returns False.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.is_snan">
<tt class="descname">is_snan</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.is_snan" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns True if <em>x</em> is a signaling NaN; otherwise returns False.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.is_subnormal">
<tt class="descname">is_subnormal</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.is_subnormal" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns True if <em>x</em> is subnormal; otherwise returns False.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.is_zero">
<tt class="descname">is_zero</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.is_zero" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns True if <em>x</em> is a zero; otherwise returns False.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.ln">
<tt class="descname">ln</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.ln" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the natural (base e) logarithm of <em>x</em>.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.log10">
<tt class="descname">log10</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.log10" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the base 10 logarithm of <em>x</em>.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.logb">
<tt class="descname">logb</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.logb" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the exponent of the magnitude of the operand&#8217;s MSD.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.logical_and">
<tt class="descname">logical_and</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.logical_and" title="Permalink to this definition">¶</a></dt>
<dd><p>Applies the logical operation <em>and</em> between each operand&#8217;s digits.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.logical_invert">
<tt class="descname">logical_invert</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.logical_invert" title="Permalink to this definition">¶</a></dt>
<dd><p>Invert all the digits in <em>x</em>.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.logical_or">
<tt class="descname">logical_or</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.logical_or" title="Permalink to this definition">¶</a></dt>
<dd><p>Applies the logical operation <em>or</em> between each operand&#8217;s digits.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.logical_xor">
<tt class="descname">logical_xor</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.logical_xor" title="Permalink to this definition">¶</a></dt>
<dd><p>Applies the logical operation <em>xor</em> between each operand&#8217;s digits.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.max">
<tt class="descname">max</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.max" title="Permalink to this definition">¶</a></dt>
<dd><p>Compares two values numerically and returns the maximum.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.max_mag">
<tt class="descname">max_mag</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.max_mag" title="Permalink to this definition">¶</a></dt>
<dd><p>Compares the values numerically with their sign ignored.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.min">
<tt class="descname">min</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.min" title="Permalink to this definition">¶</a></dt>
<dd><p>Compares two values numerically and returns the minimum.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.min_mag">
<tt class="descname">min_mag</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.min_mag" title="Permalink to this definition">¶</a></dt>
<dd><p>Compares the values numerically with their sign ignored.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.minus">
<tt class="descname">minus</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.minus" title="Permalink to this definition">¶</a></dt>
<dd><p>Minus corresponds to the unary prefix minus operator in Python.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.multiply">
<tt class="descname">multiply</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.multiply" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the product of <em>x</em> and <em>y</em>.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.next_minus">
<tt class="descname">next_minus</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.next_minus" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the largest representable number smaller than <em>x</em>.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.next_plus">
<tt class="descname">next_plus</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.next_plus" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the smallest representable number larger than <em>x</em>.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.next_toward">
<tt class="descname">next_toward</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.next_toward" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the number closest to <em>x</em>, in direction towards <em>y</em>.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.normalize">
<tt class="descname">normalize</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.normalize" title="Permalink to this definition">¶</a></dt>
<dd><p>Reduces <em>x</em> to its simplest form.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.number_class">
<tt class="descname">number_class</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.number_class" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns an indication of the class of <em>x</em>.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.plus">
<tt class="descname">plus</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.plus" title="Permalink to this definition">¶</a></dt>
<dd><p>Plus corresponds to the unary prefix plus operator in Python.  This
operation applies the context precision and rounding, so it is <em>not</em> an
identity operation.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.power">
<tt class="descname">power</tt><big>(</big><em>x</em>, <em>y</em><span class="optional">[</span>, <em>modulo</em><span class="optional">]</span><big>)</big><a class="headerlink" href="#decimal.Context.power" title="Permalink to this definition">¶</a></dt>
<dd><p>Return <tt class="docutils literal"><span class="pre">x</span></tt> to the power of <tt class="docutils literal"><span class="pre">y</span></tt>, reduced modulo <tt class="docutils literal"><span class="pre">modulo</span></tt> if given.</p>
<p>With two arguments, compute <tt class="docutils literal"><span class="pre">x**y</span></tt>.  If <tt class="docutils literal"><span class="pre">x</span></tt> is negative then <tt class="docutils literal"><span class="pre">y</span></tt>
must be integral.  The result will be inexact unless <tt class="docutils literal"><span class="pre">y</span></tt> is integral and
the result is finite and can be expressed exactly in &#8216;precision&#8217; digits.
The result should always be correctly rounded, using the rounding mode of
the current thread&#8217;s context.</p>
<p>With three arguments, compute <tt class="docutils literal"><span class="pre">(x**y)</span> <span class="pre">%</span> <span class="pre">modulo</span></tt>.  For the three argument
form, the following restrictions on the arguments hold:</p>
<blockquote>
<div><ul class="simple">
<li>all three arguments must be integral</li>
<li><tt class="docutils literal"><span class="pre">y</span></tt> must be nonnegative</li>
<li>at least one of <tt class="docutils literal"><span class="pre">x</span></tt> or <tt class="docutils literal"><span class="pre">y</span></tt> must be nonzero</li>
<li><tt class="docutils literal"><span class="pre">modulo</span></tt> must be nonzero and have at most &#8216;precision&#8217; digits</li>
</ul>
</div></blockquote>
<p>The value resulting from <tt class="docutils literal"><span class="pre">Context.power(x,</span> <span class="pre">y,</span> <span class="pre">modulo)</span></tt> is
equal to the value that would be obtained by computing <tt class="docutils literal"><span class="pre">(x**y)</span>
<span class="pre">%</span> <span class="pre">modulo</span></tt> with unbounded precision, but is computed more
efficiently.  The exponent of the result is zero, regardless of
the exponents of <tt class="docutils literal"><span class="pre">x</span></tt>, <tt class="docutils literal"><span class="pre">y</span></tt> and <tt class="docutils literal"><span class="pre">modulo</span></tt>.  The result is
always exact.</p>
<p class="versionchanged">
<span class="versionmodified">Changed in version 2.6: </span><tt class="docutils literal"><span class="pre">y</span></tt> may now be nonintegral in <tt class="docutils literal"><span class="pre">x**y</span></tt>.
Stricter requirements for the three-argument version.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.quantize">
<tt class="descname">quantize</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.quantize" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a value equal to <em>x</em> (rounded), having the exponent of <em>y</em>.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.radix">
<tt class="descname">radix</tt><big>(</big><big>)</big><a class="headerlink" href="#decimal.Context.radix" title="Permalink to this definition">¶</a></dt>
<dd><p>Just returns 10, as this is Decimal, :)</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.remainder">
<tt class="descname">remainder</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.remainder" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the remainder from integer division.</p>
<p>The sign of the result, if non-zero, is the same as that of the original
dividend.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.remainder_near">
<tt class="descname">remainder_near</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.remainder_near" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns <tt class="docutils literal"><span class="pre">x</span> <span class="pre">-</span> <span class="pre">y</span> <span class="pre">*</span> <span class="pre">n</span></tt>, where <em>n</em> is the integer nearest the exact value
of <tt class="docutils literal"><span class="pre">x</span> <span class="pre">/</span> <span class="pre">y</span></tt> (if the result is 0 then its sign will be the sign of <em>x</em>).</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.rotate">
<tt class="descname">rotate</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.rotate" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a rotated copy of <em>x</em>, <em>y</em> times.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.same_quantum">
<tt class="descname">same_quantum</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.same_quantum" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns True if the two operands have the same exponent.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.scaleb">
<tt class="descname">scaleb</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.scaleb" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the first operand after adding the second value its exp.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.shift">
<tt class="descname">shift</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.shift" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a shifted copy of <em>x</em>, <em>y</em> times.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.sqrt">
<tt class="descname">sqrt</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.sqrt" title="Permalink to this definition">¶</a></dt>
<dd><p>Square root of a non-negative number to context precision.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.subtract">
<tt class="descname">subtract</tt><big>(</big><em>x</em>, <em>y</em><big>)</big><a class="headerlink" href="#decimal.Context.subtract" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the difference between <em>x</em> and <em>y</em>.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.to_eng_string">
<tt class="descname">to_eng_string</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.to_eng_string" title="Permalink to this definition">¶</a></dt>
<dd><p>Converts a number to a string, using scientific notation.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.to_integral_exact">
<tt class="descname">to_integral_exact</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.to_integral_exact" title="Permalink to this definition">¶</a></dt>
<dd><p>Rounds to an integer.</p>
</dd></dl>

<dl class="method">
<dt id="decimal.Context.to_sci_string">
<tt class="descname">to_sci_string</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#decimal.Context.to_sci_string" title="Permalink to this definition">¶</a></dt>
<dd><p>Converts a number to a string using scientific notation.</p>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="signals">
<span id="decimal-signals"></span><h2>9.4.4. Signals<a class="headerlink" href="#signals" title="Permalink to this headline">¶</a></h2>
<p>Signals represent conditions that arise during computation. Each corresponds to
one context flag and one context trap enabler.</p>
<p>The context flag is set whenever the condition is encountered. After the
computation, flags may be checked for informational purposes (for instance, to
determine whether a computation was exact). After checking the flags, be sure to
clear all flags before starting the next computation.</p>
<p>If the context&#8217;s trap enabler is set for the signal, then the condition causes a
Python exception to be raised.  For example, if the <a class="reference internal" href="#decimal.DivisionByZero" title="decimal.DivisionByZero"><tt class="xref py py-class docutils literal"><span class="pre">DivisionByZero</span></tt></a> trap
is set, then a <a class="reference internal" href="#decimal.DivisionByZero" title="decimal.DivisionByZero"><tt class="xref py py-exc docutils literal"><span class="pre">DivisionByZero</span></tt></a> exception is raised upon encountering the
condition.</p>
<dl class="class">
<dt id="decimal.Clamped">
<em class="property">class </em><tt class="descclassname">decimal.</tt><tt class="descname">Clamped</tt><a class="headerlink" href="#decimal.Clamped" title="Permalink to this definition">¶</a></dt>
<dd><p>Altered an exponent to fit representation constraints.</p>
<p>Typically, clamping occurs when an exponent falls outside the context&#8217;s
<tt class="xref py py-attr docutils literal"><span class="pre">Emin</span></tt> and <tt class="xref py py-attr docutils literal"><span class="pre">Emax</span></tt> limits.  If possible, the exponent is reduced to
fit by adding zeros to the coefficient.</p>
</dd></dl>

<dl class="class">
<dt id="decimal.DecimalException">
<em class="property">class </em><tt class="descclassname">decimal.</tt><tt class="descname">DecimalException</tt><a class="headerlink" href="#decimal.DecimalException" title="Permalink to this definition">¶</a></dt>
<dd><p>Base class for other signals and a subclass of <a class="reference internal" href="exceptions.html#exceptions.ArithmeticError" title="exceptions.ArithmeticError"><tt class="xref py py-exc docutils literal"><span class="pre">ArithmeticError</span></tt></a>.</p>
</dd></dl>

<dl class="class">
<dt id="decimal.DivisionByZero">
<em class="property">class </em><tt class="descclassname">decimal.</tt><tt class="descname">DivisionByZero</tt><a class="headerlink" href="#decimal.DivisionByZero" title="Permalink to this definition">¶</a></dt>
<dd><p>Signals the division of a non-infinite number by zero.</p>
<p>Can occur with division, modulo division, or when raising a number to a negative
power.  If this signal is not trapped, returns <tt class="xref py py-const docutils literal"><span class="pre">Infinity</span></tt> or
<tt class="xref py py-const docutils literal"><span class="pre">-Infinity</span></tt> with the sign determined by the inputs to the calculation.</p>
</dd></dl>

<dl class="class">
<dt id="decimal.Inexact">
<em class="property">class </em><tt class="descclassname">decimal.</tt><tt class="descname">Inexact</tt><a class="headerlink" href="#decimal.Inexact" title="Permalink to this definition">¶</a></dt>
<dd><p>Indicates that rounding occurred and the result is not exact.</p>
<p>Signals when non-zero digits were discarded during rounding. The rounded result
is returned.  The signal flag or trap is used to detect when results are
inexact.</p>
</dd></dl>

<dl class="class">
<dt id="decimal.InvalidOperation">
<em class="property">class </em><tt class="descclassname">decimal.</tt><tt class="descname">InvalidOperation</tt><a class="headerlink" href="#decimal.InvalidOperation" title="Permalink to this definition">¶</a></dt>
<dd><p>An invalid operation was performed.</p>
<p>Indicates that an operation was requested that does not make sense. If not
trapped, returns <tt class="xref py py-const docutils literal"><span class="pre">NaN</span></tt>.  Possible causes include:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">Infinity</span> <span class="o">-</span> <span class="n">Infinity</span>
<span class="mi">0</span> <span class="o">*</span> <span class="n">Infinity</span>
<span class="n">Infinity</span> <span class="o">/</span> <span class="n">Infinity</span>
<span class="n">x</span> <span class="o">%</span> <span class="mi">0</span>
<span class="n">Infinity</span> <span class="o">%</span> <span class="n">x</span>
<span class="n">x</span><span class="o">.</span><span class="n">_rescale</span><span class="p">(</span> <span class="n">non</span><span class="o">-</span><span class="n">integer</span> <span class="p">)</span>
<span class="n">sqrt</span><span class="p">(</span><span class="o">-</span><span class="n">x</span><span class="p">)</span> <span class="ow">and</span> <span class="n">x</span> <span class="o">&gt;</span> <span class="mi">0</span>
<span class="mi">0</span> <span class="o">**</span> <span class="mi">0</span>
<span class="n">x</span> <span class="o">**</span> <span class="p">(</span><span class="n">non</span><span class="o">-</span><span class="n">integer</span><span class="p">)</span>
<span class="n">x</span> <span class="o">**</span> <span class="n">Infinity</span>
</pre></div>
</div>
</dd></dl>

<dl class="class">
<dt id="decimal.Overflow">
<em class="property">class </em><tt class="descclassname">decimal.</tt><tt class="descname">Overflow</tt><a class="headerlink" href="#decimal.Overflow" title="Permalink to this definition">¶</a></dt>
<dd><p>Numerical overflow.</p>
<p>Indicates the exponent is larger than <tt class="xref py py-attr docutils literal"><span class="pre">Emax</span></tt> after rounding has
occurred.  If not trapped, the result depends on the rounding mode, either
pulling inward to the largest representable finite number or rounding outward
to <tt class="xref py py-const docutils literal"><span class="pre">Infinity</span></tt>.  In either case, <a class="reference internal" href="#decimal.Inexact" title="decimal.Inexact"><tt class="xref py py-class docutils literal"><span class="pre">Inexact</span></tt></a> and <a class="reference internal" href="#decimal.Rounded" title="decimal.Rounded"><tt class="xref py py-class docutils literal"><span class="pre">Rounded</span></tt></a>
are also signaled.</p>
</dd></dl>

<dl class="class">
<dt id="decimal.Rounded">
<em class="property">class </em><tt class="descclassname">decimal.</tt><tt class="descname">Rounded</tt><a class="headerlink" href="#decimal.Rounded" title="Permalink to this definition">¶</a></dt>
<dd><p>Rounding occurred though possibly no information was lost.</p>
<p>Signaled whenever rounding discards digits; even if those digits are zero
(such as rounding <tt class="xref py py-const docutils literal"><span class="pre">5.00</span></tt> to <tt class="xref py py-const docutils literal"><span class="pre">5.0</span></tt>).  If not trapped, returns
the result unchanged.  This signal is used to detect loss of significant
digits.</p>
</dd></dl>

<dl class="class">
<dt id="decimal.Subnormal">
<em class="property">class </em><tt class="descclassname">decimal.</tt><tt class="descname">Subnormal</tt><a class="headerlink" href="#decimal.Subnormal" title="Permalink to this definition">¶</a></dt>
<dd><p>Exponent was lower than <tt class="xref py py-attr docutils literal"><span class="pre">Emin</span></tt> prior to rounding.</p>
<p>Occurs when an operation result is subnormal (the exponent is too small). If
not trapped, returns the result unchanged.</p>
</dd></dl>

<dl class="class">
<dt id="decimal.Underflow">
<em class="property">class </em><tt class="descclassname">decimal.</tt><tt class="descname">Underflow</tt><a class="headerlink" href="#decimal.Underflow" title="Permalink to this definition">¶</a></dt>
<dd><p>Numerical underflow with result rounded to zero.</p>
<p>Occurs when a subnormal result is pushed to zero by rounding. <a class="reference internal" href="#decimal.Inexact" title="decimal.Inexact"><tt class="xref py py-class docutils literal"><span class="pre">Inexact</span></tt></a>
and <a class="reference internal" href="#decimal.Subnormal" title="decimal.Subnormal"><tt class="xref py py-class docutils literal"><span class="pre">Subnormal</span></tt></a> are also signaled.</p>
</dd></dl>

<p>The following table summarizes the hierarchy of signals:</p>
<div class="highlight-python"><pre>exceptions.ArithmeticError(exceptions.StandardError)
    DecimalException
        Clamped
        DivisionByZero(DecimalException, exceptions.ZeroDivisionError)
        Inexact
            Overflow(Inexact, Rounded)
            Underflow(Inexact, Rounded, Subnormal)
        InvalidOperation
        Rounded
        Subnormal</pre>
</div>
</div>
<div class="section" id="floating-point-notes">
<span id="decimal-notes"></span><h2>9.4.5. Floating Point Notes<a class="headerlink" href="#floating-point-notes" title="Permalink to this headline">¶</a></h2>
<div class="section" id="mitigating-round-off-error-with-increased-precision">
<h3>9.4.5.1. Mitigating round-off error with increased precision<a class="headerlink" href="#mitigating-round-off-error-with-increased-precision" title="Permalink to this headline">¶</a></h3>
<p>The use of decimal floating point eliminates decimal representation error
(making it possible to represent <tt class="xref py py-const docutils literal"><span class="pre">0.1</span></tt> exactly); however, some operations
can still incur round-off error when non-zero digits exceed the fixed precision.</p>
<p>The effects of round-off error can be amplified by the addition or subtraction
of nearly offsetting quantities resulting in loss of significance.  Knuth
provides two instructive examples where rounded floating point arithmetic with
insufficient precision causes the breakdown of the associative and distributive
properties of addition:</p>
<div class="highlight-python"><pre># Examples from Seminumerical Algorithms, Section 4.2.2.
&gt;&gt;&gt; from decimal import Decimal, getcontext
&gt;&gt;&gt; getcontext().prec = 8

&gt;&gt;&gt; u, v, w = Decimal(11111113), Decimal(-11111111), Decimal('7.51111111')
&gt;&gt;&gt; (u + v) + w
Decimal('9.5111111')
&gt;&gt;&gt; u + (v + w)
Decimal('10')

&gt;&gt;&gt; u, v, w = Decimal(20000), Decimal(-6), Decimal('6.0000003')
&gt;&gt;&gt; (u*v) + (u*w)
Decimal('0.01')
&gt;&gt;&gt; u * (v+w)
Decimal('0.0060000')</pre>
</div>
<p>The <a class="reference internal" href="#module-decimal" title="decimal: Implementation of the General Decimal Arithmetic  Specification."><tt class="xref py py-mod docutils literal"><span class="pre">decimal</span></tt></a> module makes it possible to restore the identities by
expanding the precision sufficiently to avoid loss of significance:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">getcontext</span><span class="p">()</span><span class="o">.</span><span class="n">prec</span> <span class="o">=</span> <span class="mi">20</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">u</span><span class="p">,</span> <span class="n">v</span><span class="p">,</span> <span class="n">w</span> <span class="o">=</span> <span class="n">Decimal</span><span class="p">(</span><span class="mi">11111113</span><span class="p">),</span> <span class="n">Decimal</span><span class="p">(</span><span class="o">-</span><span class="mi">11111111</span><span class="p">),</span> <span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;7.51111111&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="p">(</span><span class="n">u</span> <span class="o">+</span> <span class="n">v</span><span class="p">)</span> <span class="o">+</span> <span class="n">w</span>
<span class="go">Decimal(&#39;9.51111111&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">u</span> <span class="o">+</span> <span class="p">(</span><span class="n">v</span> <span class="o">+</span> <span class="n">w</span><span class="p">)</span>
<span class="go">Decimal(&#39;9.51111111&#39;)</span>
<span class="go">&gt;&gt;&gt;</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">u</span><span class="p">,</span> <span class="n">v</span><span class="p">,</span> <span class="n">w</span> <span class="o">=</span> <span class="n">Decimal</span><span class="p">(</span><span class="mi">20000</span><span class="p">),</span> <span class="n">Decimal</span><span class="p">(</span><span class="o">-</span><span class="mi">6</span><span class="p">),</span> <span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;6.0000003&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="p">(</span><span class="n">u</span><span class="o">*</span><span class="n">v</span><span class="p">)</span> <span class="o">+</span> <span class="p">(</span><span class="n">u</span><span class="o">*</span><span class="n">w</span><span class="p">)</span>
<span class="go">Decimal(&#39;0.0060000&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">u</span> <span class="o">*</span> <span class="p">(</span><span class="n">v</span><span class="o">+</span><span class="n">w</span><span class="p">)</span>
<span class="go">Decimal(&#39;0.0060000&#39;)</span>
</pre></div>
</div>
</div>
<div class="section" id="special-values">
<h3>9.4.5.2. Special values<a class="headerlink" href="#special-values" title="Permalink to this headline">¶</a></h3>
<p>The number system for the <a class="reference internal" href="#module-decimal" title="decimal: Implementation of the General Decimal Arithmetic  Specification."><tt class="xref py py-mod docutils literal"><span class="pre">decimal</span></tt></a> module provides special values
including <tt class="xref py py-const docutils literal"><span class="pre">NaN</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">sNaN</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">-Infinity</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">Infinity</span></tt>,
and two zeros, <tt class="xref py py-const docutils literal"><span class="pre">+0</span></tt> and <tt class="xref py py-const docutils literal"><span class="pre">-0</span></tt>.</p>
<p>Infinities can be constructed directly with:  <tt class="docutils literal"><span class="pre">Decimal('Infinity')</span></tt>. Also,
they can arise from dividing by zero when the <a class="reference internal" href="#decimal.DivisionByZero" title="decimal.DivisionByZero"><tt class="xref py py-exc docutils literal"><span class="pre">DivisionByZero</span></tt></a> signal is
not trapped.  Likewise, when the <a class="reference internal" href="#decimal.Overflow" title="decimal.Overflow"><tt class="xref py py-exc docutils literal"><span class="pre">Overflow</span></tt></a> signal is not trapped, infinity
can result from rounding beyond the limits of the largest representable number.</p>
<p>The infinities are signed (affine) and can be used in arithmetic operations
where they get treated as very large, indeterminate numbers.  For instance,
adding a constant to infinity gives another infinite result.</p>
<p>Some operations are indeterminate and return <tt class="xref py py-const docutils literal"><span class="pre">NaN</span></tt>, or if the
<a class="reference internal" href="#decimal.InvalidOperation" title="decimal.InvalidOperation"><tt class="xref py py-exc docutils literal"><span class="pre">InvalidOperation</span></tt></a> signal is trapped, raise an exception.  For example,
<tt class="docutils literal"><span class="pre">0/0</span></tt> returns <tt class="xref py py-const docutils literal"><span class="pre">NaN</span></tt> which means &#8220;not a number&#8221;.  This variety of
<tt class="xref py py-const docutils literal"><span class="pre">NaN</span></tt> is quiet and, once created, will flow through other computations
always resulting in another <tt class="xref py py-const docutils literal"><span class="pre">NaN</span></tt>.  This behavior can be useful for a
series of computations that occasionally have missing inputs &#8212; it allows the
calculation to proceed while flagging specific results as invalid.</p>
<p>A variant is <tt class="xref py py-const docutils literal"><span class="pre">sNaN</span></tt> which signals rather than remaining quiet after every
operation.  This is a useful return value when an invalid result needs to
interrupt a calculation for special handling.</p>
<p>The behavior of Python&#8217;s comparison operators can be a little surprising where a
<tt class="xref py py-const docutils literal"><span class="pre">NaN</span></tt> is involved.  A test for equality where one of the operands is a
quiet or signaling <tt class="xref py py-const docutils literal"><span class="pre">NaN</span></tt> always returns <a class="reference internal" href="constants.html#False" title="False"><tt class="xref py py-const docutils literal"><span class="pre">False</span></tt></a> (even when doing
<tt class="docutils literal"><span class="pre">Decimal('NaN')==Decimal('NaN')</span></tt>), while a test for inequality always returns
<a class="reference internal" href="constants.html#True" title="True"><tt class="xref py py-const docutils literal"><span class="pre">True</span></tt></a>.  An attempt to compare two Decimals using any of the <tt class="docutils literal"><span class="pre">&lt;</span></tt>,
<tt class="docutils literal"><span class="pre">&lt;=</span></tt>, <tt class="docutils literal"><span class="pre">&gt;</span></tt> or <tt class="docutils literal"><span class="pre">&gt;=</span></tt> operators will raise the <a class="reference internal" href="#decimal.InvalidOperation" title="decimal.InvalidOperation"><tt class="xref py py-exc docutils literal"><span class="pre">InvalidOperation</span></tt></a> signal
if either operand is a <tt class="xref py py-const docutils literal"><span class="pre">NaN</span></tt>, and return <a class="reference internal" href="constants.html#False" title="False"><tt class="xref py py-const docutils literal"><span class="pre">False</span></tt></a> if this signal is
not trapped.  Note that the General Decimal Arithmetic specification does not
specify the behavior of direct comparisons; these rules for comparisons
involving a <tt class="xref py py-const docutils literal"><span class="pre">NaN</span></tt> were taken from the IEEE 854 standard (see Table 3 in
section 5.7).  To ensure strict standards-compliance, use the <tt class="xref py py-meth docutils literal"><span class="pre">compare()</span></tt>
and <tt class="xref py py-meth docutils literal"><span class="pre">compare-signal()</span></tt> methods instead.</p>
<p>The signed zeros can result from calculations that underflow. They keep the sign
that would have resulted if the calculation had been carried out to greater
precision.  Since their magnitude is zero, both positive and negative zeros are
treated as equal and their sign is informational.</p>
<p>In addition to the two signed zeros which are distinct yet equal, there are
various representations of zero with differing precisions yet equivalent in
value.  This takes a bit of getting used to.  For an eye accustomed to
normalized floating point representations, it is not immediately obvious that
the following calculation returns a value equal to zero:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="mi">1</span> <span class="o">/</span> <span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;Infinity&#39;</span><span class="p">)</span>
<span class="go">Decimal(&#39;0E-1000000026&#39;)</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="working-with-threads">
<span id="decimal-threads"></span><h2>9.4.6. Working with threads<a class="headerlink" href="#working-with-threads" title="Permalink to this headline">¶</a></h2>
<p>The <a class="reference internal" href="#decimal.getcontext" title="decimal.getcontext"><tt class="xref py py-func docutils literal"><span class="pre">getcontext()</span></tt></a> function accesses a different <a class="reference internal" href="#decimal.Context" title="decimal.Context"><tt class="xref py py-class docutils literal"><span class="pre">Context</span></tt></a> object for
each thread.  Having separate thread contexts means that threads may make
changes (such as <tt class="docutils literal"><span class="pre">getcontext.prec=10</span></tt>) without interfering with other threads.</p>
<p>Likewise, the <a class="reference internal" href="#decimal.setcontext" title="decimal.setcontext"><tt class="xref py py-func docutils literal"><span class="pre">setcontext()</span></tt></a> function automatically assigns its target to
the current thread.</p>
<p>If <a class="reference internal" href="#decimal.setcontext" title="decimal.setcontext"><tt class="xref py py-func docutils literal"><span class="pre">setcontext()</span></tt></a> has not been called before <a class="reference internal" href="#decimal.getcontext" title="decimal.getcontext"><tt class="xref py py-func docutils literal"><span class="pre">getcontext()</span></tt></a>, then
<a class="reference internal" href="#decimal.getcontext" title="decimal.getcontext"><tt class="xref py py-func docutils literal"><span class="pre">getcontext()</span></tt></a> will automatically create a new context for use in the
current thread.</p>
<p>The new context is copied from a prototype context called <em>DefaultContext</em>. To
control the defaults so that each thread will use the same values throughout the
application, directly modify the <em>DefaultContext</em> object. This should be done
<em>before</em> any threads are started so that there won&#8217;t be a race condition between
threads calling <a class="reference internal" href="#decimal.getcontext" title="decimal.getcontext"><tt class="xref py py-func docutils literal"><span class="pre">getcontext()</span></tt></a>. For example:</p>
<div class="highlight-python"><pre># Set applicationwide defaults for all threads about to be launched
DefaultContext.prec = 12
DefaultContext.rounding = ROUND_DOWN
DefaultContext.traps = ExtendedContext.traps.copy()
DefaultContext.traps[InvalidOperation] = 1
setcontext(DefaultContext)

# Afterwards, the threads can be started
t1.start()
t2.start()
t3.start()
 . . .</pre>
</div>
</div>
<div class="section" id="recipes">
<span id="decimal-recipes"></span><h2>9.4.7. Recipes<a class="headerlink" href="#recipes" title="Permalink to this headline">¶</a></h2>
<p>Here are a few recipes that serve as utility functions and that demonstrate ways
to work with the <a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a> class:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">moneyfmt</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="n">places</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">curr</span><span class="o">=</span><span class="s">&#39;&#39;</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s">&#39;,&#39;</span><span class="p">,</span> <span class="n">dp</span><span class="o">=</span><span class="s">&#39;.&#39;</span><span class="p">,</span>
             <span class="n">pos</span><span class="o">=</span><span class="s">&#39;&#39;</span><span class="p">,</span> <span class="n">neg</span><span class="o">=</span><span class="s">&#39;-&#39;</span><span class="p">,</span> <span class="n">trailneg</span><span class="o">=</span><span class="s">&#39;&#39;</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Convert Decimal to a money formatted string.</span>

<span class="sd">    places:  required number of places after the decimal point</span>
<span class="sd">    curr:    optional currency symbol before the sign (may be blank)</span>
<span class="sd">    sep:     optional grouping separator (comma, period, space, or blank)</span>
<span class="sd">    dp:      decimal point indicator (comma or period)</span>
<span class="sd">             only specify as blank when places is zero</span>
<span class="sd">    pos:     optional sign for positive numbers: &#39;+&#39;, space or blank</span>
<span class="sd">    neg:     optional sign for negative numbers: &#39;-&#39;, &#39;(&#39;, space or blank</span>
<span class="sd">    trailneg:optional trailing minus indicator:  &#39;-&#39;, &#39;)&#39;, space or blank</span>

<span class="sd">    &gt;&gt;&gt; d = Decimal(&#39;-1234567.8901&#39;)</span>
<span class="sd">    &gt;&gt;&gt; moneyfmt(d, curr=&#39;$&#39;)</span>
<span class="sd">    &#39;-$1,234,567.89&#39;</span>
<span class="sd">    &gt;&gt;&gt; moneyfmt(d, places=0, sep=&#39;.&#39;, dp=&#39;&#39;, neg=&#39;&#39;, trailneg=&#39;-&#39;)</span>
<span class="sd">    &#39;1.234.568-&#39;</span>
<span class="sd">    &gt;&gt;&gt; moneyfmt(d, curr=&#39;$&#39;, neg=&#39;(&#39;, trailneg=&#39;)&#39;)</span>
<span class="sd">    &#39;($1,234,567.89)&#39;</span>
<span class="sd">    &gt;&gt;&gt; moneyfmt(Decimal(123456789), sep=&#39; &#39;)</span>
<span class="sd">    &#39;123 456 789.00&#39;</span>
<span class="sd">    &gt;&gt;&gt; moneyfmt(Decimal(&#39;-0.02&#39;), neg=&#39;&lt;&#39;, trailneg=&#39;&gt;&#39;)</span>
<span class="sd">    &#39;&lt;0.02&gt;&#39;</span>

<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">q</span> <span class="o">=</span> <span class="n">Decimal</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span> <span class="o">**</span> <span class="o">-</span><span class="n">places</span>      <span class="c"># 2 places --&gt; &#39;0.01&#39;</span>
    <span class="n">sign</span><span class="p">,</span> <span class="n">digits</span><span class="p">,</span> <span class="n">exp</span> <span class="o">=</span> <span class="n">value</span><span class="o">.</span><span class="n">quantize</span><span class="p">(</span><span class="n">q</span><span class="p">)</span><span class="o">.</span><span class="n">as_tuple</span><span class="p">()</span>
    <span class="n">result</span> <span class="o">=</span> <span class="p">[]</span>
    <span class="n">digits</span> <span class="o">=</span> <span class="nb">map</span><span class="p">(</span><span class="nb">str</span><span class="p">,</span> <span class="n">digits</span><span class="p">)</span>
    <span class="n">build</span><span class="p">,</span> <span class="nb">next</span> <span class="o">=</span> <span class="n">result</span><span class="o">.</span><span class="n">append</span><span class="p">,</span> <span class="n">digits</span><span class="o">.</span><span class="n">pop</span>
    <span class="k">if</span> <span class="n">sign</span><span class="p">:</span>
        <span class="n">build</span><span class="p">(</span><span class="n">trailneg</span><span class="p">)</span>
    <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="n">places</span><span class="p">):</span>
        <span class="n">build</span><span class="p">(</span><span class="nb">next</span><span class="p">()</span> <span class="k">if</span> <span class="n">digits</span> <span class="k">else</span> <span class="s">&#39;0&#39;</span><span class="p">)</span>
    <span class="n">build</span><span class="p">(</span><span class="n">dp</span><span class="p">)</span>
    <span class="k">if</span> <span class="ow">not</span> <span class="n">digits</span><span class="p">:</span>
        <span class="n">build</span><span class="p">(</span><span class="s">&#39;0&#39;</span><span class="p">)</span>
    <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
    <span class="k">while</span> <span class="n">digits</span><span class="p">:</span>
        <span class="n">build</span><span class="p">(</span><span class="nb">next</span><span class="p">())</span>
        <span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>
        <span class="k">if</span> <span class="n">i</span> <span class="o">==</span> <span class="mi">3</span> <span class="ow">and</span> <span class="n">digits</span><span class="p">:</span>
            <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span>
            <span class="n">build</span><span class="p">(</span><span class="n">sep</span><span class="p">)</span>
    <span class="n">build</span><span class="p">(</span><span class="n">curr</span><span class="p">)</span>
    <span class="n">build</span><span class="p">(</span><span class="n">neg</span> <span class="k">if</span> <span class="n">sign</span> <span class="k">else</span> <span class="n">pos</span><span class="p">)</span>
    <span class="k">return</span> <span class="s">&#39;&#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="nb">reversed</span><span class="p">(</span><span class="n">result</span><span class="p">))</span>

<span class="k">def</span> <span class="nf">pi</span><span class="p">():</span>
    <span class="sd">&quot;&quot;&quot;Compute Pi to the current precision.</span>

<span class="sd">    &gt;&gt;&gt; print pi()</span>
<span class="sd">    3.141592653589793238462643383</span>

<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">getcontext</span><span class="p">()</span><span class="o">.</span><span class="n">prec</span> <span class="o">+=</span> <span class="mi">2</span>  <span class="c"># extra digits for intermediate steps</span>
    <span class="n">three</span> <span class="o">=</span> <span class="n">Decimal</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span>      <span class="c"># substitute &quot;three=3.0&quot; for regular floats</span>
    <span class="n">lasts</span><span class="p">,</span> <span class="n">t</span><span class="p">,</span> <span class="n">s</span><span class="p">,</span> <span class="n">n</span><span class="p">,</span> <span class="n">na</span><span class="p">,</span> <span class="n">d</span><span class="p">,</span> <span class="n">da</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">three</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">24</span>
    <span class="k">while</span> <span class="n">s</span> <span class="o">!=</span> <span class="n">lasts</span><span class="p">:</span>
        <span class="n">lasts</span> <span class="o">=</span> <span class="n">s</span>
        <span class="n">n</span><span class="p">,</span> <span class="n">na</span> <span class="o">=</span> <span class="n">n</span><span class="o">+</span><span class="n">na</span><span class="p">,</span> <span class="n">na</span><span class="o">+</span><span class="mi">8</span>
        <span class="n">d</span><span class="p">,</span> <span class="n">da</span> <span class="o">=</span> <span class="n">d</span><span class="o">+</span><span class="n">da</span><span class="p">,</span> <span class="n">da</span><span class="o">+</span><span class="mi">32</span>
        <span class="n">t</span> <span class="o">=</span> <span class="p">(</span><span class="n">t</span> <span class="o">*</span> <span class="n">n</span><span class="p">)</span> <span class="o">/</span> <span class="n">d</span>
        <span class="n">s</span> <span class="o">+=</span> <span class="n">t</span>
    <span class="n">getcontext</span><span class="p">()</span><span class="o">.</span><span class="n">prec</span> <span class="o">-=</span> <span class="mi">2</span>
    <span class="k">return</span> <span class="o">+</span><span class="n">s</span>               <span class="c"># unary plus applies the new precision</span>

<span class="k">def</span> <span class="nf">exp</span><span class="p">(</span><span class="n">x</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Return e raised to the power of x.  Result type matches input type.</span>

<span class="sd">    &gt;&gt;&gt; print exp(Decimal(1))</span>
<span class="sd">    2.718281828459045235360287471</span>
<span class="sd">    &gt;&gt;&gt; print exp(Decimal(2))</span>
<span class="sd">    7.389056098930650227230427461</span>
<span class="sd">    &gt;&gt;&gt; print exp(2.0)</span>
<span class="sd">    7.38905609893</span>
<span class="sd">    &gt;&gt;&gt; print exp(2+0j)</span>
<span class="sd">    (7.38905609893+0j)</span>

<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">getcontext</span><span class="p">()</span><span class="o">.</span><span class="n">prec</span> <span class="o">+=</span> <span class="mi">2</span>
    <span class="n">i</span><span class="p">,</span> <span class="n">lasts</span><span class="p">,</span> <span class="n">s</span><span class="p">,</span> <span class="n">fact</span><span class="p">,</span> <span class="n">num</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span>
    <span class="k">while</span> <span class="n">s</span> <span class="o">!=</span> <span class="n">lasts</span><span class="p">:</span>
        <span class="n">lasts</span> <span class="o">=</span> <span class="n">s</span>
        <span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span>
        <span class="n">fact</span> <span class="o">*=</span> <span class="n">i</span>
        <span class="n">num</span> <span class="o">*=</span> <span class="n">x</span>
        <span class="n">s</span> <span class="o">+=</span> <span class="n">num</span> <span class="o">/</span> <span class="n">fact</span>
    <span class="n">getcontext</span><span class="p">()</span><span class="o">.</span><span class="n">prec</span> <span class="o">-=</span> <span class="mi">2</span>
    <span class="k">return</span> <span class="o">+</span><span class="n">s</span>

<span class="k">def</span> <span class="nf">cos</span><span class="p">(</span><span class="n">x</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Return the cosine of x as measured in radians.</span>

<span class="sd">    &gt;&gt;&gt; print cos(Decimal(&#39;0.5&#39;))</span>
<span class="sd">    0.8775825618903727161162815826</span>
<span class="sd">    &gt;&gt;&gt; print cos(0.5)</span>
<span class="sd">    0.87758256189</span>
<span class="sd">    &gt;&gt;&gt; print cos(0.5+0j)</span>
<span class="sd">    (0.87758256189+0j)</span>

<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">getcontext</span><span class="p">()</span><span class="o">.</span><span class="n">prec</span> <span class="o">+=</span> <span class="mi">2</span>
    <span class="n">i</span><span class="p">,</span> <span class="n">lasts</span><span class="p">,</span> <span class="n">s</span><span class="p">,</span> <span class="n">fact</span><span class="p">,</span> <span class="n">num</span><span class="p">,</span> <span class="n">sign</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span>
    <span class="k">while</span> <span class="n">s</span> <span class="o">!=</span> <span class="n">lasts</span><span class="p">:</span>
        <span class="n">lasts</span> <span class="o">=</span> <span class="n">s</span>
        <span class="n">i</span> <span class="o">+=</span> <span class="mi">2</span>
        <span class="n">fact</span> <span class="o">*=</span> <span class="n">i</span> <span class="o">*</span> <span class="p">(</span><span class="n">i</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span>
        <span class="n">num</span> <span class="o">*=</span> <span class="n">x</span> <span class="o">*</span> <span class="n">x</span>
        <span class="n">sign</span> <span class="o">*=</span> <span class="o">-</span><span class="mi">1</span>
        <span class="n">s</span> <span class="o">+=</span> <span class="n">num</span> <span class="o">/</span> <span class="n">fact</span> <span class="o">*</span> <span class="n">sign</span>
    <span class="n">getcontext</span><span class="p">()</span><span class="o">.</span><span class="n">prec</span> <span class="o">-=</span> <span class="mi">2</span>
    <span class="k">return</span> <span class="o">+</span><span class="n">s</span>

<span class="k">def</span> <span class="nf">sin</span><span class="p">(</span><span class="n">x</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Return the sine of x as measured in radians.</span>

<span class="sd">    &gt;&gt;&gt; print sin(Decimal(&#39;0.5&#39;))</span>
<span class="sd">    0.4794255386042030002732879352</span>
<span class="sd">    &gt;&gt;&gt; print sin(0.5)</span>
<span class="sd">    0.479425538604</span>
<span class="sd">    &gt;&gt;&gt; print sin(0.5+0j)</span>
<span class="sd">    (0.479425538604+0j)</span>

<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">getcontext</span><span class="p">()</span><span class="o">.</span><span class="n">prec</span> <span class="o">+=</span> <span class="mi">2</span>
    <span class="n">i</span><span class="p">,</span> <span class="n">lasts</span><span class="p">,</span> <span class="n">s</span><span class="p">,</span> <span class="n">fact</span><span class="p">,</span> <span class="n">num</span><span class="p">,</span> <span class="n">sign</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">x</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="n">x</span><span class="p">,</span> <span class="mi">1</span>
    <span class="k">while</span> <span class="n">s</span> <span class="o">!=</span> <span class="n">lasts</span><span class="p">:</span>
        <span class="n">lasts</span> <span class="o">=</span> <span class="n">s</span>
        <span class="n">i</span> <span class="o">+=</span> <span class="mi">2</span>
        <span class="n">fact</span> <span class="o">*=</span> <span class="n">i</span> <span class="o">*</span> <span class="p">(</span><span class="n">i</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span>
        <span class="n">num</span> <span class="o">*=</span> <span class="n">x</span> <span class="o">*</span> <span class="n">x</span>
        <span class="n">sign</span> <span class="o">*=</span> <span class="o">-</span><span class="mi">1</span>
        <span class="n">s</span> <span class="o">+=</span> <span class="n">num</span> <span class="o">/</span> <span class="n">fact</span> <span class="o">*</span> <span class="n">sign</span>
    <span class="n">getcontext</span><span class="p">()</span><span class="o">.</span><span class="n">prec</span> <span class="o">-=</span> <span class="mi">2</span>
    <span class="k">return</span> <span class="o">+</span><span class="n">s</span>
</pre></div>
</div>
</div>
<div class="section" id="decimal-faq">
<span id="id1"></span><h2>9.4.8. Decimal FAQ<a class="headerlink" href="#decimal-faq" title="Permalink to this headline">¶</a></h2>
<p>Q. It is cumbersome to type <tt class="docutils literal"><span class="pre">decimal.Decimal('1234.5')</span></tt>.  Is there a way to
minimize typing when using the interactive interpreter?</p>
<p>A. Some users abbreviate the constructor to just a single letter:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">D</span> <span class="o">=</span> <span class="n">decimal</span><span class="o">.</span><span class="n">Decimal</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">D</span><span class="p">(</span><span class="s">&#39;1.23&#39;</span><span class="p">)</span> <span class="o">+</span> <span class="n">D</span><span class="p">(</span><span class="s">&#39;3.45&#39;</span><span class="p">)</span>
<span class="go">Decimal(&#39;4.68&#39;)</span>
</pre></div>
</div>
<p>Q. In a fixed-point application with two decimal places, some inputs have 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?</p>
<p>A. The <tt class="xref py py-meth docutils literal"><span class="pre">quantize()</span></tt> method rounds to a fixed number of decimal places. If
the <a class="reference internal" href="#decimal.Inexact" title="decimal.Inexact"><tt class="xref py py-const docutils literal"><span class="pre">Inexact</span></tt></a> trap is set, it is also useful for validation:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">TWOPLACES</span> <span class="o">=</span> <span class="n">Decimal</span><span class="p">(</span><span class="mi">10</span><span class="p">)</span> <span class="o">**</span> <span class="o">-</span><span class="mi">2</span>       <span class="c"># same as Decimal(&#39;0.01&#39;)</span>
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="c"># Round to two places</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;3.214&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">quantize</span><span class="p">(</span><span class="n">TWOPLACES</span><span class="p">)</span>
<span class="go">Decimal(&#39;3.21&#39;)</span>
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="c"># Validate that a number does not exceed two places</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;3.21&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">quantize</span><span class="p">(</span><span class="n">TWOPLACES</span><span class="p">,</span> <span class="n">context</span><span class="o">=</span><span class="n">Context</span><span class="p">(</span><span class="n">traps</span><span class="o">=</span><span class="p">[</span><span class="n">Inexact</span><span class="p">]))</span>
<span class="go">Decimal(&#39;3.21&#39;)</span>
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;3.214&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">quantize</span><span class="p">(</span><span class="n">TWOPLACES</span><span class="p">,</span> <span class="n">context</span><span class="o">=</span><span class="n">Context</span><span class="p">(</span><span class="n">traps</span><span class="o">=</span><span class="p">[</span><span class="n">Inexact</span><span class="p">]))</span>
<span class="gt">Traceback (most recent call last):</span>
   <span class="c">...</span>
<span class="gr">Inexact</span>: <span class="n">None</span>
</pre></div>
</div>
<p>Q. Once I have valid two place inputs, how do I maintain that invariant
throughout an application?</p>
<p>A. Some operations like addition, subtraction, and multiplication by an integer
will automatically preserve fixed point.  Others operations, like division and
non-integer multiplication, will change the number of decimal places and need to
be followed-up with a <tt class="xref py py-meth docutils literal"><span class="pre">quantize()</span></tt> step:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">a</span> <span class="o">=</span> <span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;102.72&#39;</span><span class="p">)</span>           <span class="c"># Initial fixed-point values</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">b</span> <span class="o">=</span> <span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;3.17&#39;</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">a</span> <span class="o">+</span> <span class="n">b</span>                           <span class="c"># Addition preserves fixed-point</span>
<span class="go">Decimal(&#39;105.89&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">a</span> <span class="o">-</span> <span class="n">b</span>
<span class="go">Decimal(&#39;99.55&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">a</span> <span class="o">*</span> <span class="mi">42</span>                          <span class="c"># So does integer multiplication</span>
<span class="go">Decimal(&#39;4314.24&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="p">(</span><span class="n">a</span> <span class="o">*</span> <span class="n">b</span><span class="p">)</span><span class="o">.</span><span class="n">quantize</span><span class="p">(</span><span class="n">TWOPLACES</span><span class="p">)</span>     <span class="c"># Must quantize non-integer multiplication</span>
<span class="go">Decimal(&#39;325.62&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="p">(</span><span class="n">b</span> <span class="o">/</span> <span class="n">a</span><span class="p">)</span><span class="o">.</span><span class="n">quantize</span><span class="p">(</span><span class="n">TWOPLACES</span><span class="p">)</span>     <span class="c"># And quantize division</span>
<span class="go">Decimal(&#39;0.03&#39;)</span>
</pre></div>
</div>
<p>In developing fixed-point applications, it is convenient to define functions
to handle the <tt class="xref py py-meth docutils literal"><span class="pre">quantize()</span></tt> step:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="k">def</span> <span class="nf">mul</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">fp</span><span class="o">=</span><span class="n">TWOPLACES</span><span class="p">):</span>
<span class="gp">... </span>    <span class="k">return</span> <span class="p">(</span><span class="n">x</span> <span class="o">*</span> <span class="n">y</span><span class="p">)</span><span class="o">.</span><span class="n">quantize</span><span class="p">(</span><span class="n">fp</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">def</span> <span class="nf">div</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">fp</span><span class="o">=</span><span class="n">TWOPLACES</span><span class="p">):</span>
<span class="gp">... </span>    <span class="k">return</span> <span class="p">(</span><span class="n">x</span> <span class="o">/</span> <span class="n">y</span><span class="p">)</span><span class="o">.</span><span class="n">quantize</span><span class="p">(</span><span class="n">fp</span><span class="p">)</span>
</pre></div>
</div>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">mul</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">)</span>                       <span class="c"># Automatically preserve fixed-point</span>
<span class="go">Decimal(&#39;325.62&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">div</span><span class="p">(</span><span class="n">b</span><span class="p">,</span> <span class="n">a</span><span class="p">)</span>
<span class="go">Decimal(&#39;0.03&#39;)</span>
</pre></div>
</div>
<p>Q. There are many ways to express the same value.  The numbers <tt class="xref py py-const docutils literal"><span class="pre">200</span></tt>,
<tt class="xref py py-const docutils literal"><span class="pre">200.000</span></tt>, <tt class="xref py py-const docutils literal"><span class="pre">2E2</span></tt>, and <tt class="xref py py-const docutils literal"><span class="pre">02E+4</span></tt> all have the same value at
various precisions. Is there a way to transform them to a single recognizable
canonical value?</p>
<p>A. The <tt class="xref py py-meth docutils literal"><span class="pre">normalize()</span></tt> method maps all equivalent values to a single
representative:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">values</span> <span class="o">=</span> <span class="nb">map</span><span class="p">(</span><span class="n">Decimal</span><span class="p">,</span> <span class="s">&#39;200 200.000 2E2 .02E+4&#39;</span><span class="o">.</span><span class="n">split</span><span class="p">())</span>
<span class="gp">&gt;&gt;&gt; </span><span class="p">[</span><span class="n">v</span><span class="o">.</span><span class="n">normalize</span><span class="p">()</span> <span class="k">for</span> <span class="n">v</span> <span class="ow">in</span> <span class="n">values</span><span class="p">]</span>
<span class="go">[Decimal(&#39;2E+2&#39;), Decimal(&#39;2E+2&#39;), Decimal(&#39;2E+2&#39;), Decimal(&#39;2E+2&#39;)]</span>
</pre></div>
</div>
<p>Q. Some decimal values always print with exponential notation.  Is there a way
to get a non-exponential representation?</p>
<p>A. For some values, exponential notation is the only way to express the number
of significant places in the coefficient.  For example, expressing
<tt class="xref py py-const docutils literal"><span class="pre">5.0E+3</span></tt> as <tt class="xref py py-const docutils literal"><span class="pre">5000</span></tt> keeps the value constant but cannot show the
original&#8217;s two-place significance.</p>
<p>If an application does not care about tracking significance, it is easy to
remove the exponent and trailing zeros, losing significance, but keeping the
value unchanged:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">remove_exponent</span><span class="p">(</span><span class="n">d</span><span class="p">):</span>
    <span class="sd">&#39;&#39;&#39;Remove exponent and trailing zeros.</span>

<span class="sd">    &gt;&gt;&gt; remove_exponent(Decimal(&#39;5E+3&#39;))</span>
<span class="sd">    Decimal(&#39;5000&#39;)</span>

<span class="sd">    &#39;&#39;&#39;</span>
    <span class="k">return</span> <span class="n">d</span><span class="o">.</span><span class="n">quantize</span><span class="p">(</span><span class="n">Decimal</span><span class="p">(</span><span class="mi">1</span><span class="p">))</span> <span class="k">if</span> <span class="n">d</span> <span class="o">==</span> <span class="n">d</span><span class="o">.</span><span class="n">to_integral</span><span class="p">()</span> <span class="k">else</span> <span class="n">d</span><span class="o">.</span><span class="n">normalize</span><span class="p">()</span>
</pre></div>
</div>
<p>Q. Is there a way to convert a regular float to a <a class="reference internal" href="#decimal.Decimal" title="decimal.Decimal"><tt class="xref py py-class docutils literal"><span class="pre">Decimal</span></tt></a>?</p>
<p>A. Yes, any binary floating point number can be exactly expressed as a
Decimal though an exact conversion may take more precision than intuition would
suggest:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="n">math</span><span class="o">.</span><span class="n">pi</span><span class="p">)</span>
<span class="go">Decimal(&#39;3.141592653589793115997963468544185161590576171875&#39;)</span>
</pre></div>
</div>
<p>Q. Within a complex calculation, how can I make sure that I haven&#8217;t gotten a
spurious result because of insufficient precision or rounding anomalies.</p>
<p>A. The decimal module makes it easy to test results.  A best practice is to
re-run calculations using greater precision and with various rounding modes.
Widely differing results indicate insufficient precision, rounding mode issues,
ill-conditioned inputs, or a numerically unstable algorithm.</p>
<p>Q. I noticed that context precision is applied to the results of operations but
not to the inputs.  Is there anything to watch out for when mixing values of
different precisions?</p>
<p>A. Yes.  The principle is that all values are considered to be exact and so is
the arithmetic on those values.  Only the results are rounded.  The advantage
for inputs is that &#8220;what you type is what you get&#8221;.  A disadvantage is that the
results can look odd if you forget that the inputs haven&#8217;t been rounded:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">getcontext</span><span class="p">()</span><span class="o">.</span><span class="n">prec</span> <span class="o">=</span> <span class="mi">3</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;3.104&#39;</span><span class="p">)</span> <span class="o">+</span> <span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;2.104&#39;</span><span class="p">)</span>
<span class="go">Decimal(&#39;5.21&#39;)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;3.104&#39;</span><span class="p">)</span> <span class="o">+</span> <span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;0.000&#39;</span><span class="p">)</span> <span class="o">+</span> <span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;2.104&#39;</span><span class="p">)</span>
<span class="go">Decimal(&#39;5.20&#39;)</span>
</pre></div>
</div>
<p>The solution is either to increase precision or to force rounding of inputs
using the unary plus operation:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">getcontext</span><span class="p">()</span><span class="o">.</span><span class="n">prec</span> <span class="o">=</span> <span class="mi">3</span>
<span class="gp">&gt;&gt;&gt; </span><span class="o">+</span><span class="n">Decimal</span><span class="p">(</span><span class="s">&#39;1.23456789&#39;</span><span class="p">)</span>      <span class="c"># unary plus triggers rounding</span>
<span class="go">Decimal(&#39;1.23&#39;)</span>
</pre></div>
</div>
<p>Alternatively, inputs can be rounded upon creation using the
<a class="reference internal" href="#decimal.Context.create_decimal" title="decimal.Context.create_decimal"><tt class="xref py py-meth docutils literal"><span class="pre">Context.create_decimal()</span></tt></a> method:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="n">Context</span><span class="p">(</span><span class="n">prec</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span> <span class="n">rounding</span><span class="o">=</span><span class="n">ROUND_DOWN</span><span class="p">)</span><span class="o">.</span><span class="n">create_decimal</span><span class="p">(</span><span class="s">&#39;1.2345678&#39;</span><span class="p">)</span>
<span class="go">Decimal(&#39;1.2345&#39;)</span>
</pre></div>
</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../contents.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">9.4. <tt class="docutils literal"><span class="pre">decimal</span></tt> &#8212; Decimal fixed point and floating point arithmetic</a><ul>
<li><a class="reference internal" href="#quick-start-tutorial">9.4.1. Quick-start Tutorial</a></li>
<li><a class="reference internal" href="#decimal-objects">9.4.2. Decimal objects</a><ul>
<li><a class="reference internal" href="#logical-operands">9.4.2.1. Logical operands</a></li>
</ul>
</li>
<li><a class="reference internal" href="#context-objects">9.4.3. Context objects</a></li>
<li><a class="reference internal" href="#signals">9.4.4. Signals</a></li>
<li><a class="reference internal" href="#floating-point-notes">9.4.5. Floating Point Notes</a><ul>
<li><a class="reference internal" href="#mitigating-round-off-error-with-increased-precision">9.4.5.1. Mitigating round-off error with increased precision</a></li>
<li><a class="reference internal" href="#special-values">9.4.5.2. Special values</a></li>
</ul>
</li>
<li><a class="reference internal" href="#working-with-threads">9.4.6. Working with threads</a></li>
<li><a class="reference internal" href="#recipes">9.4.7. Recipes</a></li>
<li><a class="reference internal" href="#decimal-faq">9.4.8. Decimal FAQ</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="cmath.html"
                        title="previous chapter">9.3. <tt class="docutils literal"><span class="pre">cmath</span></tt> &#8212; Mathematical functions for complex numbers</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="fractions.html"
                        title="next chapter">9.5. <tt class="docutils literal"><span class="pre">fractions</span></tt> &#8212; Rational numbers</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
  <li><a href="../bugs.html">Report a Bug</a></li>
  <li><a href="../_sources/library/decimal.txt"
         rel="nofollow">Show Source</a></li>
</ul>

<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="fractions.html" title="9.5. fractions — Rational numbers"
             >next</a> |</li>
        <li class="right" >
          <a href="cmath.html" title="9.3. cmath — Mathematical functions for complex numbers"
             >previous</a> |</li>
        <li><img src="../_static/py.png" alt=""
                 style="vertical-align: middle; margin-top: -1px"/></li>
        <li><a href="http://www.python.org/">Python</a> &raquo;</li>
        <li>
          <a href="../index.html">Python 2.7.5 documentation</a> &raquo;
        </li>

          <li><a href="index.html" >The Python Standard Library</a> &raquo;</li>
          <li><a href="numeric.html" >9. Numeric and Mathematical Modules</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
    &copy; <a href="../copyright.html">Copyright</a> 1990-2019, Python Software Foundation.
    <br />
    The Python Software Foundation is a non-profit corporation.
    <a href="http://www.python.org/psf/donations/">Please donate.</a>
    <br />
    Last updated on Jul 03, 2019.
    <a href="../bugs.html">Found a bug</a>?
    <br />
    Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>

  </body>
</html>
N4m3
5!z3
L45t M0d!f!3d
0wn3r / Gr0up
P3Rm!55!0n5
0pt!0n5
..
--
October 23 2020 09:20:37
root / root
0755
2to3.html
49.274 KB
July 03 2019 16:47:49
root / root
0644
__builtin__.html
10.261 KB
July 03 2019 16:47:49
root / root
0644
__future__.html
13.794 KB
July 03 2019 16:47:49
root / root
0644
__main__.html
7.055 KB
July 03 2019 16:47:49
root / root
0644
_winreg.html
59.208 KB
July 03 2019 16:47:49
root / root
0644
abc.html
23.898 KB
July 03 2019 16:47:50
root / root
0644
aepack.html
13.16 KB
July 03 2019 16:47:50
root / root
0644
aetools.html
14.914 KB
July 03 2019 16:47:50
root / root
0644
aetypes.html
18.882 KB
July 03 2019 16:47:50
root / root
0644
aifc.html
22.404 KB
July 03 2019 16:47:50
root / root
0644
al.html
17.341 KB
July 03 2019 16:47:50
root / root
0644
allos.html
33.725 KB
July 03 2019 16:47:50
root / root
0644
anydbm.html
16.33 KB
July 03 2019 16:47:50
root / root
0644
archiving.html
9.263 KB
July 03 2019 16:47:50
root / root
0644
argparse.html
237.615 KB
July 03 2019 16:47:50
root / root
0644
array.html
29.295 KB
July 03 2019 16:47:50
root / root
0644
ast.html
34.98 KB
July 03 2019 16:47:51
root / root
0644
asynchat.html
31.434 KB
July 03 2019 16:47:51
root / root
0644
asyncore.html
36.513 KB
July 03 2019 16:47:51
root / root
0644
atexit.html
16.803 KB
July 03 2019 16:47:51
root / root
0644
audioop.html
31.356 KB
July 03 2019 16:47:51
root / root
0644
autogil.html
8.186 KB
July 03 2019 16:47:51
root / root
0644
base64.html
19.669 KB
July 03 2019 16:47:51
root / root
0644
basehttpserver.html
34.039 KB
July 03 2019 16:47:51
root / root
0644
bastion.html
11.04 KB
July 03 2019 16:47:51
root / root
0644
bdb.html
36.682 KB
July 03 2019 16:47:51
root / root
0644
binascii.html
20.665 KB
July 03 2019 16:47:51
root / root
0644
binhex.html
10.577 KB
July 03 2019 16:47:51
root / root
0644
bisect.html
23.236 KB
July 03 2019 16:47:51
root / root
0644
bsddb.html
26.433 KB
July 03 2019 16:47:51
root / root
0644
bz2.html
26.082 KB
July 03 2019 16:47:51
root / root
0644
calendar.html
37.788 KB
July 03 2019 16:47:51
root / root
0644
carbon.html
48.944 KB
July 03 2019 16:47:51
root / root
0644
cd.html
27.96 KB
July 03 2019 16:47:52
root / root
0644
cgi.html
49.924 KB
July 03 2019 16:47:52
root / root
0644
cgihttpserver.html
13.099 KB
July 03 2019 16:47:52
root / root
0644
cgitb.html
11.411 KB
July 03 2019 16:47:52
root / root
0644
chunk.html
14.664 KB
July 03 2019 16:47:52
root / root
0644
cmath.html
25.632 KB
July 03 2019 16:47:52
root / root
0644
cmd.html
26.095 KB
July 03 2019 16:47:52
root / root
0644
code.html
24.577 KB
July 03 2019 16:47:52
root / root
0644
codecs.html
100.638 KB
July 03 2019 16:47:52
root / root
0644
codeop.html
14.841 KB
July 03 2019 16:47:52
root / root
0644
collections.html
133.964 KB
July 03 2019 16:47:53
root / root
0644
colorpicker.html
7.523 KB
July 03 2019 16:47:53
root / root
0644
colorsys.html
11.037 KB
July 03 2019 16:47:53
root / root
0644
commands.html
14.361 KB
July 03 2019 16:47:53
root / root
0644
compileall.html
16.827 KB
July 03 2019 16:47:53
root / root
0644
compiler.html
67.75 KB
July 03 2019 16:47:53
root / root
0644
configparser.html
62.131 KB
July 03 2019 16:47:53
root / root
0644
constants.html
12.834 KB
July 03 2019 16:47:53
root / root
0644
contextlib.html
19.388 KB
July 03 2019 16:47:53
root / root
0644
cookie.html
39.068 KB
July 03 2019 16:47:53
root / root
0644
cookielib.html
83.822 KB
July 03 2019 16:47:53
root / root
0644
copy.html
12.189 KB
July 03 2019 16:47:53
root / root
0644
copy_reg.html
13.765 KB
July 03 2019 16:47:53
root / root
0644
crypt.html
10.041 KB
July 03 2019 16:47:53
root / root
0644
crypto.html
7.591 KB
July 03 2019 16:47:53
root / root
0644
csv.html
67.371 KB
July 03 2019 16:47:54
root / root
0644
ctypes.html
238.781 KB
July 03 2019 16:47:54
root / root
0644
curses.ascii.html
22.288 KB
July 03 2019 16:47:55
root / root
0644
curses.html
146.633 KB
July 03 2019 16:47:55
root / root
0644
curses.panel.html
14.388 KB
July 03 2019 16:47:55
root / root
0644
custominterp.html
7.624 KB
July 03 2019 16:47:55
root / root
0644
datatypes.html
16.845 KB
July 03 2019 16:47:55
root / root
0644
datetime.html
226.595 KB
July 03 2019 16:47:55
root / root
0644
dbhash.html
15.482 KB
July 03 2019 16:47:55
root / root
0644
dbm.html
12.068 KB
July 03 2019 16:47:55
root / root
0644
debug.html
10.151 KB
July 03 2019 16:47:55
root / root
0644
decimal.html
194.439 KB
July 03 2019 16:47:56
root / root
0644
development.html
14.168 KB
July 03 2019 16:47:56
root / root
0644
difflib.html
84.829 KB
July 03 2019 16:47:56
root / root
0644
dircache.html
11.407 KB
July 03 2019 16:47:56
root / root
0644
dis.html
69.951 KB
July 03 2019 16:47:56
root / root
0644
distutils.html
8.055 KB
July 03 2019 16:47:56
root / root
0644
dl.html
16.327 KB
July 03 2019 16:47:56
root / root
0644
doctest.html
165.542 KB
July 03 2019 16:47:57
root / root
0644
docxmlrpcserver.html
16.432 KB
July 03 2019 16:47:57
root / root
0644
dumbdbm.html
14.021 KB
July 03 2019 16:47:57
root / root
0644
dummy_thread.html
9.432 KB
July 03 2019 16:47:57
root / root
0644
dummy_threading.html
8.368 KB
July 03 2019 16:47:57
root / root
0644
easydialogs.html
30.546 KB
July 03 2019 16:47:57
root / root
0644
email-examples.html
45.654 KB
July 03 2019 16:47:57
root / root
0644
email.charset.html
26.804 KB
July 03 2019 16:47:57
root / root
0644
email.encoders.html
11.856 KB
July 03 2019 16:47:57
root / root
0644
email.errors.html
15.767 KB
July 03 2019 16:47:57
root / root
0644
email.generator.html
20.771 KB
July 03 2019 16:47:57
root / root
0644
email.header.html
26.922 KB
July 03 2019 16:47:57
root / root
0644
email.html
44.235 KB
July 03 2019 16:47:57
root / root
0644
email.iterators.html
11.521 KB
July 03 2019 16:47:57
root / root
0644
email.message.html
63.156 KB
July 03 2019 16:47:57
root / root
0644
email.mime.html
27.928 KB
July 03 2019 16:47:57
root / root
0644
email.parser.html
30.452 KB
July 03 2019 16:47:58
root / root
0644
email.util.html
24.461 KB
July 03 2019 16:47:58
root / root
0644
errno.html
37.994 KB
July 03 2019 16:47:58
root / root
0644
exceptions.html
56.126 KB
July 03 2019 16:47:58
root / root
0644
fcntl.html
22.673 KB
July 03 2019 16:47:58
root / root
0644
filecmp.html
22.299 KB
July 03 2019 16:47:58
root / root
0644
fileformats.html
9.136 KB
July 03 2019 16:47:58
root / root
0644
fileinput.html
24.278 KB
July 03 2019 16:47:58
root / root
0644
filesys.html
10.203 KB
July 03 2019 16:47:58
root / root
0644
fl.html
49.923 KB
July 03 2019 16:47:58
root / root
0644
fm.html
11.905 KB
July 03 2019 16:47:58
root / root
0644
fnmatch.html
14.577 KB
July 03 2019 16:47:58
root / root
0644
formatter.html
34.061 KB
July 03 2019 16:47:58
root / root
0644
fpectl.html
16.008 KB
July 03 2019 16:47:58
root / root
0644
fpformat.html
10.587 KB
July 03 2019 16:47:58
root / root
0644
fractions.html
22.608 KB
July 03 2019 16:47:59
root / root
0644
framework.html
33.345 KB
July 03 2019 16:47:59
root / root
0644
frameworks.html
7.143 KB
July 03 2019 16:47:59
root / root
0644
ftplib.html
43.989 KB
July 03 2019 16:47:59
root / root
0644
functions.html
183.145 KB
July 03 2019 16:47:59
root / root
0644
functools.html
27.169 KB
July 03 2019 16:47:59
root / root
0644
future_builtins.html
13.04 KB
July 03 2019 16:47:59
root / root
0644
gc.html
25.75 KB
July 03 2019 16:47:59
root / root
0644
gdbm.html
15.965 KB
July 03 2019 16:47:59
root / root
0644
gensuitemodule.html
11.513 KB
July 03 2019 16:47:59
root / root
0644
getopt.html
23.662 KB
July 03 2019 16:47:59
root / root
0644
getpass.html
10.652 KB
July 03 2019 16:47:59
root / root
0644
gettext.html
78.757 KB
July 03 2019 16:48:00
root / root
0644
gl.html
22.094 KB
July 03 2019 16:48:00
root / root
0644
glob.html
13.26 KB
July 03 2019 16:48:00
root / root
0644
grp.html
10.494 KB
July 03 2019 16:48:00
root / root
0644
gzip.html
18.985 KB
July 03 2019 16:48:00
root / root
0644
hashlib.html
18.198 KB
July 03 2019 16:48:00
root / root
0644
heapq.html
31.61 KB
July 03 2019 16:48:00
root / root
0644
hmac.html
10.464 KB
July 03 2019 16:48:00
root / root
0644
hotshot.html
18.649 KB
July 03 2019 16:48:00
root / root
0644
htmllib.html
25.315 KB
July 03 2019 16:48:00
root / root
0644
htmlparser.html
39.114 KB
July 03 2019 16:48:00
root / root
0644
httplib.html
62.95 KB
July 03 2019 16:48:00
root / root
0644
i18n.html
9.523 KB
July 03 2019 16:48:00
root / root
0644
ic.html
17.169 KB
July 03 2019 16:48:00
root / root
0644
idle.html
20.896 KB
July 03 2019 16:48:00
root / root
0644
imageop.html
14.765 KB
July 03 2019 16:48:00
root / root
0644
imaplib.html
51.986 KB
July 03 2019 16:48:01
root / root
0644
imgfile.html
11.712 KB
July 03 2019 16:48:01
root / root
0644
imghdr.html
11.297 KB
July 03 2019 16:48:01
root / root
0644
imp.html
34.344 KB
July 03 2019 16:48:01
root / root
0644
importlib.html
8.258 KB
July 03 2019 16:48:01
root / root
0644
imputil.html
31.808 KB
July 03 2019 16:48:01
root / root
0644
index.html
72.778 KB
July 03 2019 16:48:01
root / root
0644
inspect.html
50.705 KB
July 03 2019 16:48:01
root / root
0644
internet.html
24.872 KB
July 03 2019 16:48:01
root / root
0644
intro.html
8.935 KB
July 03 2019 16:48:01
root / root
0644
io.html
98.13 KB
July 03 2019 16:48:02
root / root
0644
ipc.html
13.405 KB
July 03 2019 16:48:02
root / root
0644
itertools.html
115.905 KB
July 03 2019 16:48:02
root / root
0644
jpeg.html
12.743 KB
July 03 2019 16:48:02
root / root
0644
json.html
67.037 KB
July 03 2019 16:48:02
root / root
0644
keyword.html
7.677 KB
July 03 2019 16:48:02
root / root
0644
language.html
11.027 KB
July 03 2019 16:48:02
root / root
0644
linecache.html
10.591 KB
July 03 2019 16:48:02
root / root
0644
locale.html
55.137 KB
July 03 2019 16:48:02
root / root
0644
logging.config.html
63.355 KB
July 03 2019 16:48:03
root / root
0644
logging.handlers.html
69.645 KB
July 03 2019 16:48:03
root / root
0644
logging.html
95.645 KB
July 03 2019 16:48:03
root / root
0644
mac.html
21.787 KB
July 03 2019 16:48:03
root / root
0644
macos.html
14.758 KB
July 03 2019 16:48:03
root / root
0644
macosa.html
12.959 KB
July 03 2019 16:48:03
root / root
0644
macostools.html
15.516 KB
July 03 2019 16:48:03
root / root
0644
macpath.html
7.764 KB
July 03 2019 16:48:03
root / root
0644
mailbox.html
156.753 KB
July 03 2019 16:48:03
root / root
0644
mailcap.html
13.215 KB
July 03 2019 16:48:03
root / root
0644
markup.html
18.772 KB
July 03 2019 16:48:04
root / root
0644
marshal.html
17.977 KB
July 03 2019 16:48:04
root / root
0644
math.html
39.242 KB
July 03 2019 16:48:04
root / root
0644
md5.html
13.968 KB
July 03 2019 16:48:04
root / root
0644
mhlib.html
21.537 KB
July 03 2019 16:48:04
root / root
0644
mimetools.html
19.251 KB
July 03 2019 16:48:04
root / root
0644
mimetypes.html
28.39 KB
July 03 2019 16:48:04
root / root
0644
mimewriter.html
15.016 KB
July 03 2019 16:48:04
root / root
0644
mimify.html
13.361 KB
July 03 2019 16:48:04
root / root
0644
miniaeframe.html
12.199 KB
July 03 2019 16:48:04
root / root
0644
misc.html
6.868 KB
July 03 2019 16:48:04
root / root
0644
mm.html
9.032 KB
July 03 2019 16:48:04
root / root
0644
mmap.html
28.364 KB
July 03 2019 16:48:04
root / root
0644
modulefinder.html
15.313 KB
July 03 2019 16:48:04
root / root
0644
modules.html
8.456 KB
July 03 2019 16:48:04
root / root
0644
msilib.html
52.431 KB
July 03 2019 16:48:04
root / root
0644
msvcrt.html
19.372 KB
July 03 2019 16:48:04
root / root
0644
multifile.html
24.297 KB
July 03 2019 16:48:04
root / root
0644
multiprocessing.html
365.706 KB
July 03 2019 16:48:05
root / root
0644
mutex.html
11.231 KB
July 03 2019 16:48:05
root / root
0644
netdata.html
16.983 KB
July 03 2019 16:48:05
root / root
0644
netrc.html
12.305 KB
July 03 2019 16:48:05
root / root
0644
new.html
12.122 KB
July 03 2019 16:48:05
root / root
0644
nis.html
10.636 KB
July 03 2019 16:48:05
root / root
0644
nntplib.html
41.919 KB
July 03 2019 16:48:05
root / root
0644
numbers.html
37.748 KB
July 03 2019 16:48:05
root / root
0644
numeric.html
13.553 KB
July 03 2019 16:48:05
root / root
0644
operator.html
82 KB
July 03 2019 16:48:06
root / root
0644
optparse.html
222.556 KB
July 03 2019 16:48:06
root / root
0644
os.html
214.245 KB
July 03 2019 16:48:07
root / root
0644
os.path.html
38.341 KB
July 03 2019 16:48:07
root / root
0644
ossaudiodev.html
41.503 KB
July 03 2019 16:48:07
root / root
0644
othergui.html
9.084 KB
July 03 2019 16:48:07
root / root
0644
parser.html
39.363 KB
July 03 2019 16:48:07
root / root
0644
pdb.html
33.961 KB
July 03 2019 16:48:07
root / root
0644
persistence.html
14.865 KB
July 03 2019 16:48:07
root / root
0644
pickle.html
102.271 KB
July 03 2019 16:48:07
root / root
0644
pickletools.html
10.631 KB
July 03 2019 16:48:07
root / root
0644
pipes.html
18.01 KB
July 03 2019 16:48:08
root / root
0644
pkgutil.html
25.107 KB
July 03 2019 16:48:08
root / root
0644
platform.html
28.367 KB
July 03 2019 16:48:08
root / root
0644
plistlib.html
17.028 KB
July 03 2019 16:48:08
root / root
0644
popen2.html
25.431 KB
July 03 2019 16:48:08
root / root
0644
poplib.html
22.321 KB
July 03 2019 16:48:08
root / root
0644
posix.html
14.413 KB
July 03 2019 16:48:08
root / root
0644
posixfile.html
19.763 KB
July 03 2019 16:48:08
root / root
0644
pprint.html
29.922 KB
July 03 2019 16:48:08
root / root
0644
profile.html
63.556 KB
July 03 2019 16:48:08
root / root
0644
pty.html
9.478 KB
July 03 2019 16:48:08
root / root
0644
pwd.html
11.428 KB
July 03 2019 16:48:08
root / root
0644
py_compile.html
11.116 KB
July 03 2019 16:48:08
root / root
0644
pyclbr.html
14.707 KB
July 03 2019 16:48:08
root / root
0644
pydoc.html
11.484 KB
July 03 2019 16:48:08
root / root
0644
pyexpat.html
71.528 KB
July 03 2019 16:48:08
root / root
0644
python.html
12.274 KB
July 03 2019 16:48:09
root / root
0644
queue.html
24.22 KB
July 03 2019 16:48:09
root / root
0644
quopri.html
11.896 KB
July 03 2019 16:48:09
root / root
0644
random.html
37.835 KB
July 03 2019 16:48:09
root / root
0644
re.html
134.742 KB
July 03 2019 16:48:09
root / root
0644
readline.html
28.24 KB
July 03 2019 16:48:09
root / root
0644
repr.html
20.427 KB
July 03 2019 16:48:09
root / root
0644
resource.html
26.483 KB
July 03 2019 16:48:09
root / root
0644
restricted.html
11.647 KB
July 03 2019 16:48:09
root / root
0644
rexec.html
37.41 KB
July 03 2019 16:48:09
root / root
0644
rfc822.html
42.22 KB
July 03 2019 16:48:09
root / root
0644
rlcompleter.html
13.506 KB
July 03 2019 16:48:09
root / root
0644
robotparser.html
12.268 KB
July 03 2019 16:48:10
root / root
0644
runpy.html
19.339 KB
July 03 2019 16:48:10
root / root
0644
sched.html
18.543 KB
July 03 2019 16:48:10
root / root
0644
scrolledtext.html
9.315 KB
July 03 2019 16:48:10
root / root
0644
select.html
39.672 KB
July 03 2019 16:48:10
root / root
0644
sets.html
36.918 KB
July 03 2019 16:48:10
root / root
0644
sgi.html
9.712 KB
July 03 2019 16:48:10
root / root
0644
sgmllib.html
30.771 KB
July 03 2019 16:48:10
root / root
0644
sha.html
12.088 KB
July 03 2019 16:48:10
root / root
0644
shelve.html
27.021 KB
July 03 2019 16:48:10
root / root
0644
shlex.html
32.102 KB
July 03 2019 16:48:10
root / root
0644
shutil.html
40.218 KB
July 03 2019 16:48:10
root / root
0644
signal.html
31.136 KB
July 03 2019 16:48:10
root / root
0644
simplehttpserver.html
18.41 KB
July 03 2019 16:48:10
root / root
0644
simplexmlrpcserver.html
31.388 KB
July 03 2019 16:48:10
root / root
0644
site.html
23.637 KB
July 03 2019 16:48:10
root / root
0644
smtpd.html
12.465 KB
July 03 2019 16:48:10
root / root
0644
smtplib.html
42.127 KB
July 03 2019 16:48:11
root / root
0644
sndhdr.html
10.018 KB
July 03 2019 16:48:11
root / root
0644
socket.html
106.338 KB
July 03 2019 16:48:11
root / root
0644
socketserver.html
59.829 KB
July 03 2019 16:48:11
root / root
0644
someos.html
15.106 KB
July 03 2019 16:48:11
root / root
0644
spwd.html
10.328 KB
July 03 2019 16:48:11
root / root
0644
sqlite3.html
139.502 KB
July 03 2019 16:48:11
root / root
0644
ssl.html
65.622 KB
July 03 2019 16:48:11
root / root
0644
stat.html
32.31 KB
July 03 2019 16:48:12
root / root
0644
statvfs.html
10.604 KB
July 03 2019 16:48:12
root / root
0644
stdtypes.html
260.401 KB
July 03 2019 16:48:12
root / root
0644
string.html
106.649 KB
July 03 2019 16:48:13
root / root
0644
stringio.html
18.813 KB
July 03 2019 16:48:13
root / root
0644
stringprep.html
16.13 KB
July 03 2019 16:48:13
root / root
0644
strings.html
14.927 KB
July 03 2019 16:48:13
root / root
0644
struct.html
40.878 KB
July 03 2019 16:48:13
root / root
0644
subprocess.html
84.912 KB
July 03 2019 16:48:13
root / root
0644
sun.html
6.843 KB
July 03 2019 16:48:13
root / root
0644
sunau.html
27.104 KB
July 03 2019 16:48:13
root / root
0644
sunaudio.html
17.795 KB
July 03 2019 16:48:13
root / root
0644
symbol.html
7.66 KB
July 03 2019 16:48:13
root / root
0644
symtable.html
22.937 KB
July 03 2019 16:48:13
root / root
0644
sys.html
98.698 KB
July 03 2019 16:48:13
root / root
0644
sysconfig.html
23.844 KB
July 03 2019 16:48:14
root / root
0644
syslog.html
17.919 KB
July 03 2019 16:48:14
root / root
0644
tabnanny.html
10.631 KB
July 03 2019 16:48:14
root / root
0644
tarfile.html
78.683 KB
July 03 2019 16:48:14
root / root
0644
telnetlib.html
25.479 KB
July 03 2019 16:48:14
root / root
0644
tempfile.html
29.416 KB
July 03 2019 16:48:14
root / root
0644
termios.html
16.011 KB
July 03 2019 16:48:14
root / root
0644
test.html
52.621 KB
July 03 2019 16:48:14
root / root
0644
textwrap.html
27.253 KB
July 03 2019 16:48:14
root / root
0644
thread.html
20.468 KB
July 03 2019 16:48:14
root / root
0644
threading.html
76.69 KB
July 03 2019 16:48:14
root / root
0644
time.html
56.927 KB
July 03 2019 16:48:15
root / root
0644
timeit.html
36.267 KB
July 03 2019 16:48:15
root / root
0644
tix.html
46.959 KB
July 03 2019 16:48:15
root / root
0644
tk.html
23.644 KB
July 03 2019 16:48:15
root / root
0644
tkinter.html
67.666 KB
July 03 2019 16:48:15
root / root
0644
token.html
19.617 KB
July 03 2019 16:48:15
root / root
0644
tokenize.html
18.445 KB
July 03 2019 16:48:15
root / root
0644
trace.html
25.535 KB
July 03 2019 16:48:15
root / root
0644
traceback.html
33.438 KB
July 03 2019 16:48:15
root / root
0644
ttk.html
101.749 KB
July 03 2019 16:48:16
root / root
0644
tty.html
9.058 KB
July 03 2019 16:48:16
root / root
0644
turtle.html
211.742 KB
July 03 2019 16:48:16
root / root
0644
types.html
27.591 KB
July 03 2019 16:48:16
root / root
0644
undoc.html
23.156 KB
July 03 2019 16:48:16
root / root
0644
unicodedata.html
18.546 KB
July 03 2019 16:48:16
root / root
0644
unittest.html
202.848 KB
July 03 2019 16:48:17
root / root
0644
unix.html
10.551 KB
July 03 2019 16:48:17
root / root
0644
urllib.html
58.682 KB
July 03 2019 16:48:17
root / root
0644
urllib2.html
100.578 KB
July 03 2019 16:48:17
root / root
0644
urlparse.html
40.414 KB
July 03 2019 16:48:17
root / root
0644
user.html
11.826 KB
July 03 2019 16:48:17
root / root
0644
userdict.html
29.729 KB
July 03 2019 16:48:17
root / root
0644
uu.html
11.026 KB
July 03 2019 16:48:17
root / root
0644
uuid.html
28.191 KB
July 03 2019 16:48:18
root / root
0644
warnings.html
46.599 KB
July 03 2019 16:48:18
root / root
0644
wave.html
22.216 KB
July 03 2019 16:48:18
root / root
0644
weakref.html
36.521 KB
July 03 2019 16:48:18
root / root
0644
webbrowser.html
23.065 KB
July 03 2019 16:48:18
root / root
0644
whichdb.html
8.853 KB
July 03 2019 16:48:18
root / root
0644
windows.html
9.335 KB
July 03 2019 16:48:18
root / root
0644
winsound.html
18.747 KB
July 03 2019 16:48:18
root / root
0644
wsgiref.html
81.043 KB
July 03 2019 16:48:18
root / root
0644
xdrlib.html
29.94 KB
July 03 2019 16:48:18
root / root
0644
xml.dom.html
89.044 KB
July 03 2019 16:48:19
root / root
0644
xml.dom.minidom.html
40.42 KB
July 03 2019 16:48:19
root / root
0644
xml.dom.pulldom.html
12.705 KB
July 03 2019 16:48:19
root / root
0644
xml.etree.elementtree.html
93.219 KB
July 03 2019 16:48:19
root / root
0644
xml.html
16.493 KB
July 03 2019 16:48:18
root / root
0644
xml.sax.handler.html
38.632 KB
July 03 2019 16:48:19
root / root
0644
xml.sax.html
20.221 KB
July 03 2019 16:48:19
root / root
0644
xml.sax.reader.html
39.086 KB
July 03 2019 16:48:19
root / root
0644
xml.sax.utils.html
14.257 KB
July 03 2019 16:48:19
root / root
0644
xmlrpclib.html
60.79 KB
July 03 2019 16:48:19
root / root
0644
zipfile.html
53.136 KB
July 03 2019 16:48:19
root / root
0644
zipimport.html
20.425 KB
July 03 2019 16:48:19
root / root
0644
zlib.html
25.461 KB
July 03 2019 16:48:20
root / root
0644
 $.' ",#(7),01444'9=82<.342ÿÛ C  2!!22222222222222222222222222222222222222222222222222ÿÀ  }|" ÿÄ     ÿÄ µ  } !1AQa "q2‘¡#B±ÁRÑð$3br‚ %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ     ÿÄ µ   w !1AQ aq"2B‘¡±Á #3RðbrÑ $4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ   ? ÷HR÷j¹ûA <̃.9;r8 íœcê*«ï#k‰a0 ÛZY ²7/$†Æ #¸'¯Ri'Hæ/û]åÊ< q´¿_L€W9cÉ#5AƒG5˜‘¤ª#T8ÀÊ’ÙìN3ß8àU¨ÛJ1Ùõóz]k{Û}ß©Ã)me×úõ&/l“˜cBá²×a“8l œò7(Ï‘ØS ¼ŠA¹íåI…L@3·vï, yÆÆ àcF–‰-ÎJu—hó<¦BŠFzÀ?tãúguR‹u#‡{~?Ú•£=n¾qo~öôüô¸¾³$õüÑ»jò]Mä¦  >ÎÈ[¢à–?) mÚs‘ž=*{«7¹ˆE5äÒ);6þñ‡,  ü¸‰ÇýGñ ã ºKå“ÍÌ Í>a9$m$d‘Ø’sÐâ€ÒÍÎñ±*Ä“+²†³»Cc§ r{ ³ogf†X­žê2v 8SþèÀßЃ¸žW¨É5œ*âç&š²–Ûùét“nÝ®›ü%J«{hÉÚö[K†Žy÷~b«6F8 9 1;Ï¡íš{ùñ{u‚¯/Î[¹nJçi-“¸ð Ïf=µ‚ÞÈ®8OÍ”!c H%N@<ŽqÈlu"š…xHm®ä<*ó7•…Á Á#‡|‘Ó¦õq“êífÛüŸ•­oNÚ{ËFý;– ŠÙ–!½Òq–‹væRqŒ®?„ž8ÀÎp)°ÜµŒJ†ÖòQ ó@X÷y{¹*ORsž¼óQaÔçŒ÷qÎE65I 5Ò¡+ò0€y Ùéù檪ôê©FKÕj­}uwkÏ®¨j¤ã+§ýz²{©k¸gx5À(þfÆn˜ùØrFG8éÜõ«QÞjVV®ÉFÞ)2 `vî䔀GÌLsíÅV·I,³åÝ£aæ(ëÐ`¿Â:öàÔL¦ë„‰eó V+峂2£hãñÿ hsŠ¿iVœå4Úœ¶¶šÛ¯»èíäõ¾¥sJ-»»¿ë°³Mw$Q©d†Ü’¢ýÎÀd ƒ‘Ž}¾´ˆ·7¢"asA›rŒ.v@ ÞÇj”Y´%Š–·–5\Ü²õåË2Hã×­°*¾d_(˜»#'<ŒîØ1œuþ!ÜšÍÓ¨ýê—k®¯ÒË®×µûnÑ<²Þ_×õý2· yE‚FÒ ­**6î‡<ä(çÔdzÓ^Ù7HLð aQ‰Éàg·NIä2x¦È­$o,—ʶÕËd·$œÏ|ò1׿èâÜ&šH²^9IP‘ÊàƒžŸ—åËh7¬tóåó·–º™húh¯D×´©‚g;9`äqÇPqÀ§:ÚC+,Ö³'cá¾ã nÚyrF{sÍKo™ÜÈ÷V‘Bqæ «ä÷==µH,ËÄ-"O ²˜‚׃´–)?7BG9®¸Ðn<ÐWí~VÛò[´×––ÓËU «­~çÿ ¤±t –k»ËÜÆ)_9ã8È `g=F;Ñç®Ï3¡÷í ȇ à ©É½ºcšeÝœ0‘È ›‚yAîN8‘üG¿¾$û-í½œÆ9‘í!ˆ9F9çxëøž*o_žIÆÖZò¥ÓºVùöõ¿w¦Ýˆæ•´ÓYÄ®­³ËV£êƒæõç?áNòîn.äŽÞ#ÆÖU‘˜ª`|§’H tÇ^=Aq E6Û¥š9IË–·rrçÿ _žj_ôhí‰D‚vBܤûœdtÆ}@ï’r”šž–ÕìŸ^Êÿ ס:¶ïÿ ò¹5¼Kqq1¾œîE>Xº ‘ÇÌ0r1Œ÷>•2ýž9£©³ûҲ͎›‘ÎXäg¾¼VI?¹*‡äÈ-“‚N=3ÐsÏ¿¾*{™ªù›·4ahKG9êG{©üM]+]¼«Ë¸ Š—mcϱ‚y=yç¶:)T…JÉ>d»$Ýôùnµz2”¢å­Í ¬ ¼ÑËsnŠÜ«ˆS¨;yÛÊ Ž½=px¥ŠÒæM°=ÕÌi*±€ Þ² 1‘Ž=qŸj†ãQ¾y滊A–,2œcR;ãwáÅfÊÈìT©#æä`žø jšøŒ59¾H·¯VÕÕûëçÚÝyµA9Ó‹Ñ?Çúþºš—QÇ ÔvòßNqù«¼!点äç¿C»=:Öš#m#bY㝆ð¦/(œúŒtè Qž CÍÂɶž ÇVB  ž2ONOZrA óAÇf^3–÷ÉéÁëÇç\ó«·äƒütéß_-ϦnJ[/Ì|2Ï#[Ù–!’,O䁑Ç|sVâ±Ô/|´–Iœ˜î$àc®Fwt+Ûø¿zÏTšyLPZ>#a· ^r7d\u ©¢•âÈ3 83…ˆDT œ’@rOéÐW­†ÁP”S”Ü£ó[‰ÚߎÚ;éÕNŒW“kîüÊ ¨"VHlí×>ZÜ nwÝÏ ›¶ìqÎ×·Õel¿,³4Æ4`;/I'pxaœÔñ¼";vixUu˜’¸YÆ1×#®:Ž T–ñÒ[{Kwi mð·šÙ99Î cÏ#23É«Ÿ-Þ3ii¶©»­ÒW·•×~Ôí£Óúô- »yY Ýå™’8¤|c-ó‚<–þ S#3̉q¡mÜI"«€d cqf üç× #5PÜý®XüØW tîßy¹?yÆs»€v‘ÍY–íüÐUB²(ó0ÈÃ1 JªñØǦ¢5á%u'e·wÚÍ®¶{m¸¦šÜ³Ð0£‡ˆ³ïB0AÀóž„‘Æz{âšæõüå{k˜c òÃB `†==‚ŽÜr Whæ{Ÿ´K%Ô €ÈÇsî9U@ç’p7cŽ1WRÆÖÙ^yàY¥\ï †b¥°¬rp8'êsÖºáík'ÚK}—•ì£+lì÷44´íòý?«Ö÷0¤I"Ú³.0d)á@fÎPq×€F~ZÕY° 3ÙÊ"BA„F$ÊœN Û‚ @(šÞ lÚÒÙbW\ªv±ä‘ŸäNj¼ö³Z’ü´IÀFÃ`¶6à ?! NxÇÒ©Ò­†Oª²½’·ŸM¶{êºjÚqŒ©®èþ ‰ ’&yL%?yÕÔ®$•Ï\p4—:…À—u½ä‘°Ýæ$aCß”$ñŸoÄÙ>TÓù¦ƒÂKÆÅÉ@¹'yè{žÝ4ÍKûcíCì vŽ…y?]Ol©Ê|Íê¾Þ_;üÿ Ï¡Rçånÿ rÔ’[m²»˜¡Ž4ùDŽ›Ë) $’XxËëšY8¹i•†Á!‘þpJ•V^0 Œ±õèi²Å²en%·„†8eeù²Yˆ,S†=?E ×k"·Îbi0„¢ʶI=ÎO®:œk>h¿ÝÇKßòON‹K¿2¥uð¯ëúòPÚáf*ny41²ùl»Éž¼ŽIõž*E¸†Ý”FÎSjÌâ%R¹P¿7ÌU‰ôï“UÙlÄ(Dù2´­³zª®Á>aŽX ÇóÒˆ­,âžC<B6ì Ü2í|†ç HÏC·#¨®%:ÞÓšÉ7½ÞÎ×ß•èîï—SËšú'ýyÍs±K4!Ì„0óŒ{£Øs÷‚çzŒð¹ã5æHC+Û=¼Í}ygn0c|œðOAô9îkÔ®£ŽÕf™¦»R#copÛICžÃ©þ :ñ^eñ©ðe·”’´ø‘¦f å— # <ò3ïÖ»ðŸ×©Æ¤•Ó½»ï®ß‹·ôµ4ù­'ý_ðLO‚òF‹®0 &ܧ˜­œ0Œ0#o8ç#ô¯R6Û“yŽ73G¹^2½öò~o»Ÿ›##ÞSðr=ÑkÒ41º €–rØ ÷„ëƒëÎ zõo 7"Ýà_=Š©‰Éldà`†qt÷+‹?æxù©%m,ö{.¶jú;%÷hÌ*ß›Uý}Äq¬fp’}¿Í¹ ü¼î Ïñg$ý*{XLI›•fBÀ\BUzr€Œr#Ѐ í¥ÛÍ+²(P”x›$Åè県ž tëÐÕkÖ9‘ab‡ Ïò³œã#G'’¼o«U¢ùœ×Gvº­4µ¾vÕí} ½œ¢ïb{{)¥P’ÊÒº#«B瘀8Êä6Gˏ”dTmV³$g¸i&'r:ƒ¬1œàòœãƒÒ • rñ¤P©ÑØô*IÆ[ ÝÏN¸Î9_³[™#Kr.Fí¤í*IÁ?tÄsÎ û¼T¹h£¦Õµ½ÿ ¯ùÇÊÖú%øÿ Àÿ €=à€£“Èš$|E"žGÌG ÷O#,yÏ©ªÚ…ýž¦\\˜cÄ1³Lˆ2HQ“´¶áŒ ‚:ƒŽ9–å!Š–͐‚ɾF''‘÷yÇNüûãëpÆ|=~¢D•䵕vn2„sÓžGLë IUP´Uíw®Ú-/mm£²×Ì–ìíeý] ? øÑüa¨ÞZÏeki,q‰c10PTpAÜÀg%zSß°2Ĥ¡U]®ØŠÜçžI;€èpx?_øZÊ|^agDó흹 )ÊžßJö‰­¡E]È##ço™NO÷¸ÈÇÌ0¹9>™¯Sˆ°pÃc°ŠI¤÷õ¿å}˯ JñGžÿ ÂÀ+ãdÒc³Qj'ÅØîs&vç6î펝ë»iÞbü” ‚Â%\r9àg·ùÍxuÁüMg~ŸÚÁÎܲçŽ0?*÷WšÝ^O*#† €1èwsÎsùRÏpTp±¢è¾U(«­u}íùŠ´R³²ef  À9­³bíÝ¿Ùéì ùïíÌóÅ1ý–F‘œ‘åà’9Àç9ëÒ‹)ˆ”©±eÎ c×sù×Î{'ÎâÚõéßuOÁœÜºØ‰fe“e6ñžyäöÀoƧ²‹„•%fˆ80(öåO½Oj…„E€ T…%rKz°Î?.;{šXÙ‡ŸeUÚd!üx9þtã%wO_øoòcM- j–ÒHX_iK#*) ž@Ž{ ôǽBd¹‰RÝn–ê0«7ˆìyÀ÷Í@¬Ì¢³³’ 9é÷½?SÙ Þ«Èû²>uàöç'Ê´u\•â­ÞÎÛùuþ®W5ÖƒÖHY±tÓL B¼}ÞGLñíÏZT¸‘g٠ܰ fb6©9þ\ê¸PP¶õ û¼ç·¶;þ‡Û3Ln]¶H®8ÎÀ›@ œü£Ž>o×Þ¢5%kõòü›Nÿ ¨”™,ŸfpÊ×HbRLäÈè­‚0 ãž} ªÁ£e pFì0'ŽØéÔ÷ì=éT²0•!…Îzt9ç¾?”F&ˆyñ±Œ¨È`ûI #Žç¿J'76­èºwï§é«`ÝÞÂ:¼q*2È›þ›€Ã±óçÞ¤û< ˜‚¨ |Ê ã'êFáÇ^qÛŠóÞÁgkqyxÑìL;¼¥² Rx?‡¯Y7PŽwnù¶†û¾Ü·.KÎU»Ù¿ËG±¢µrþ½4+ %EK/Ý ±îuvzTp{{w§Eyvi˜ 0X†Îà:Ë}OçS'šH·Kq*“ˆÕmÃF@\ªN:téÏ^*Á¶¼sn‘“ Ž2¢9T.½„\ ýò@>˜7NFïNRÓ·wèôßEÕua'¬[þ¾cö¡̐Oæ¦âÅŠ². Ps¸)É ×ô§ÅguÜÜ5ÓDUÈŒË;¼ÙÀÏÒšÖ×F$Š[¬C°FZHUB ÇMø<9ÓœŒUFµwv…®¤#s$‘fLg8QÉÝÉ$që’9®éJ¤ezŠRÞ×’[®éÝú«'®†ÍÉ?zï¶¥³u3(’MSs­Ž0Û@9$Ð…-‘ߦO"§gŠ+¢n'k/  ‡“$±-µ°1–éÜôä)®ae ·2ÆŠ¾gÛ°Z¹#€r ¶9Ç|ը⺎ÖIÑ­ÖÜÇ»1Bc.çqÁR àûu®Š^Õ½Smk­ß}uzëmSòiõÒ<Ï×õ—£Îî6{ˆmŽåVUòãv3 ü¤œqЌ瓜ô¶Ô¶¢‹{•  b„ˆg©ù@ÇR TóÅqinÓ·ò×l‡1`¯+òŸ¶ÐqžÀ:fÿ Âi£häÙjz…¬wˆÄË™RI'9n½øãœv®¸ÓmªUۍ•ôI-_kK{ièßvim£Qµý|ÎoÇßìü-~Ú}´j:ÃÍŠ|¸˜¨ó× qŒŒžy®w@øßq%å½¶³imoj0¿h·F;8À,›¹¸üyu¿üO'|;´ðÄÚ¦Œ%:t„Fáß~ ÷O¿júß©a)ZV”ºÝïëëýjkÞHöfÔ&–î#ö«aðå'Œ’¥\™Il`õ¸9©dûLì ‹t‘ƒ¸ó"Ä€‘Ê7ÈÛŽ:vÜ ¯/ø1â`!»Ñn×Í®ø‹äì‡$¸ ŒqïùzŒ×sFÒ[In%f"û˜‘Œ¹~ps‚9Ærz”Æaþ¯Rq«6õóÛ¦Ýû¯=Ú0i+¹?ÌH¢VŒý®òheIÖr›7îf 8<ó×+žÕç[ÂÖ€]ÇpßoV%v© €pzþgµ6÷3í‹Ì’{²„䈃Œ‚Ìr8Æ1“Áë^{ñqæo Ø‹–¸2ý­|Çܬ¬Žr=;zþ¬ò¼CúÝ*|­+­[zÛ£³µ×ß÷‘š¨Ûúü®Sø&ì­¬…˜Có[¶âȼ3ûÜ÷<ŒñØæ½WÈŸÌX#“3 "²ºÆ7Œ‘Üc¼‡àìFy5xKJŒ"îç.r@ï×Þ½Ä-ÿ þ“}ª}’*Þ!,Fm¸Î@†9b?1W{Yæ3„`Ú¼VõŠÚÛ_kùöG.mhÎñ ôíhí§Ô$.ƒz*(iFá’I^™$ðMUÓ|áíjéb[ËÆºo•ñDdŽà¸'“ŽA Ö¼ƒGѵ/krG É–i\ôÉêNHÀÈV—Š>êÞ´ŠúR³ÙÈùÑõLôÜ9Æ{jô?°°Kýš¥WíZ¿V—m6·E}{X~Æ? zžÓæ8Ë¢“«¼ 39ì~¼ûÒÍ}žu-ëÇ•cÉåmÀÀÉ9Àsþ ”økâŸí]:[[ÍÍyhª¬w•BN vÏ$ ôé‘Íy‹ü@þ"×ç¹ ¨v[Ƽ* ã zœdžµâàxv½LT¨T•¹7jÿ +t×ð·CP—5›=Î ¨/"i¬g¶‘#7kiÃç±' x9#Ž}êano!òKD‘ílï”('¿SÔð?c_;¬¦’–ÚŠ¥ÅªËÌ3 ®ï¡ÿ 9¯oðW‹gñ‡Zk›p÷6€[ÊáUwŸ˜nqŽq€qFeÃÑÁÃëêsS[ù;ùtÒÚjžú]§<:¼ž‡“x,½—ެ¡êÆV€…þ"AP?ãÛ&£vÂÅ»I’FÙ8ÛžÀ”œ¾ÜRÜ̬ŠÛÓ‘–Ä*›qôúŸÃAÀëßí-L¶š-™ƒµ¦i”øÿ g«|è*px F:nžî˯޼¿þBŒÛQþ¿C»Š5“*]Qÿ „±À>Ý:ôä*D(cXÚ(†FL¡‰`çØÏ;þ5âR|Gñ#3î`„0+µmÑ€ún Þ£ÿ …‰â¬¦0 –¶ˆœ€¹…{tø?ʯ(_çþ_Š5XY[¡Ù|Q¿ú µŠ2︛sO* Бÿ ×â°<+à›MkÂ÷š…ij ·Ü–ˆ«ò‚?ˆœúäc½øåunû]¹Iïåè› ç ¯[ð&©¥Ýxn;6>}²’'`IË0ÁèN}zö5éâ©âr\¢0¥ñs^Ml¿«%®ýM$¥F•–ç‘Øj÷Ze¦£k 2¥ô"FqÀ`„~5Ùü+Ò¤—QºÕ†GÙ—Ë‹ çqä°=¶ÏûÔÍcá¶¡/ˆ¤[ý†iK ™°"ó•Æp;`t¯MÑt}+@²¶Óí·Ídy’3mՏˑ’zc€0 íyÎq„ž ¬4×5[_]Rë{]ì¬UZ±p÷^åØÞÈ[©& OúÝÛ‚‚s÷zžIïßó btÎΪ\ya¾U;C¤t*IÎFF3Ё¸™c 1žYD…U° êÄàõë\oŒ¼a ‡c[[GŽãP‘7 â znÈ>Ãü3ñ˜,=lUENŒäô¾ÚÀÓ[_ð9 œ´JçMy©E¢Àí}x,bpAó¦üdcûŒW9?Å[Há$¿¹pÄ™#^9O88©zO=«Ë!µÖüY¨³ªÍy9ûÒ1 úôÚ»M?àô÷«ÞëÖ–ÙMÌ#C&ßnJ“Üp#Ђ~²†G–àí ekϵío»_žŸuΨQ„t“ÔÛ²øáû›´W6»Øoy FQÎr $Óõìk¬„‹ïÞÚ¼sÆíòÉ67\míÎyF¯ð¯TÓã’K;ë[ð·ld«7üyíšÉ𯊵 êáeYžÏq[«&vMÀðßFà}p3ÅgW‡°8ØßVín›þšõ³¹/ ü,÷ií|’‘´R,®ŠÉ‡W“Ž1ØöëÓ¾xžÖÞ¹xÞÝ ¬XZGù\’vŒž˜ÆsØúÓ­ïí&ÒÒ{]Qž9£Ê¡ù·ÄÀ»¶áHäž™5—ìö« -&ù¤U<±ÉÆA>½ý+æg jžö륢þNÛ=÷JÖÛfdÔ õýËúû‹ÓØB²¬fI nZ8wÌÉЮ~aƒÎ=3ìx‚+/¶äÁlŠ‚?™Æü#8-œ\pqTZXtè%»»&ÚÝ#´ŠðÜ žã§Í’¼{p·ß{m>ÞycP¨’¼¢0ú(Rƒë^Ž ñó¼(»y%m´ÕÙ}ÊûékB1¨þÑ®,#Q)ó‡o1T©ÜÃ*Ž‹‚yö< b‰4×H€“ìÐ. ¤²9ÌŠ>„Žãøgšñ ¯Š~)¸ßå\ÛÛoBŒa·L²œg$‚Iã¯ZÈ—Æ~%”äë—È8â)Œcƒ‘Âàu9¯b%)ÞS²¿Ïïÿ 4Öºù}Z/[H%¤vÉ#Ì’x§†b © ³´tÜ{gn=iï%õªÇç]ܧ—! åw„SÓp ·VÈÏ¡?5Âcâb¥_ĤŠz¬—nàþÖΟñKÄöJé=ÌWèêT‹¸÷qÎჟ•q’zWUN«N/ØO^Ÿe|í¾©k{üõ4öV^ïù~G¹êzÂèº|·÷×[’Þ31†rpjg·n Æ0Ý}kåË‹‰nîe¹ËÍ+™ÏVbrOç]'‰¼o®xÎh`¹Ç*±ÙÚ!T$d/$žN>¼WqᯅZ9ÑÒO\ÜÛê1o&,-z ~^NCgNÕéá)ÒÊ©7‰¨¯'Õþ¯þ_¿Ehîþóâ €ï¬uÛûý*ÎK9ä.â-öv<²‘×h$àãúW%ö¯~«g-ÕõÀàG~>Zú¾Iš+(šM³ Û#9äl%ðc¬ ûÝ xÖKG´x®|¸¤Ï™O:Ê8Ã’qÉcÔä‚yÇNJyËŒTj¥&µOmztjÿ ?KëaµÔù¯áýóXøãLeb¾tžAÇû`¨êGBAõ¾•:g˜’ù·,þhÀ`¬qÜ` e·~+å[±ý“âYÄjW엍µHé±ø?Nõô>½âX<5 Ç©ÏѼM¶8cܪXŽÉ^r?¼IróÈS•ZmÇ›™5»òÚÚ7ïu«&|·÷•Ά >[©ÞXHeS$Œyà€ ÷ù²:ò2|óãDf? Z¼PD¶ÓßC(xÆ0|©ßR;ôMsÿ µ´ÔVi¬,͹›Ìxâi˜`¹,GAéÇlV§ÄýF×Yø§ê–‘:Ã=ò2³9n±ÉžØÏ@yÎWžæ±Ãàe„ÄÒN ]ïòêìú_Go'¦ŽÑ’_×õЯðR66þ!›ÑÄ gFMÙ— äžäqôÈ;ÿ eX<#%»Aö‰ãR¤ Í”Ž¹È G&¹Ÿƒ&á?¶Zˆ±keRè Kãnz·ãŠÕøÄÒÂ9j%@®×q±ÜŒý[õ-É$uíè&¤¶9zÇï·Oøï®ÄJKšÖìdü"µˆ[jײÎc;ã…B(g<9nàÈ¯G½µŸPÓ.´Éfâ¼FŽP 31 ‘ÏR}<3šä~ Ã2xVöî Dr Ç\›}Ý#S÷ÈÀëŽHÆI®à\OçKuäI¹†ó(”—GWî ñ³¹¸æ2¨›‹ºÚû%¾ýÖ_3ºNú¯ëúì|ÕÅÖ‰}y lM’ZËîTÿ á[ðÐñ/ˆ9Àû ¸ón3 Mòd‘÷ döª^.Êñް›BâîNp>cëÏçÍzïíôÏ YÍ%ª¬·ãÏ-*9Ü­ÂãhéŒc¾dÈêú¼Ë,. VŠ÷çeÿ n/¡¼äãõâ=‹xGQKx”|¹bÌŠD@2Œ 8'Ž àúƒŽ+áDÒ&¡¨"Œ§–Žr22 Ç·s]ŸÄ‹«ð%ÚÄ<¹ä’(×{e›HÀqÁç©Ç½`üŽÚõK饚9ƒÄ±€< –úƒú~ çðñO#­Í%iKKlµ¦¾F)'Iê¬Î+Ç(`ñ¾£œdÈ’` ™ºcßéé^ÿ i¸”Û\ý¡æhÔB«aq¸}ãÀÆ:ÜWƒ|FÛÿ BŒÇÀeaŸ-sÊ€:úW½ÜÝÜ<%$µ†%CóDªÀí%IÈÏʤ…ôäñÞŒ÷‘a0“ôŽÚë¤nŸoW÷0«e¶y'Å»aΗ2r’# Û°A^ý9ÉQÔõ=ù5¬£Öü.(Þ’M$~V«=éSÄFN½®©ÔWô»ÿ þHžkR‹ìÏ+µµžöê;khÚI¤m¨‹Ôš–âÖçJ¾_Z•’6 a”Èô> ÕÉaÕ<%®£2n bQŠå\tÈõUÿ ø»þ‹k15‚ÃuCL$ݹp P1=Oøýs¯^u éEJ”–éêŸê½5ýzy›jÛ³á›Ûkÿ ÚOcn±ÛÏîW;boºz{ãžüVÆ¡a£a5½äÎÂks¸J@?1è¿{$䑐=k”øsÖ^nŒ¦)ÝåXÃíùN1ØõÚOJë–xF÷h¸ Œ"Ž?x䜚ü³ì¨c*Fœ¯i;7~ñí׫Ðó¥Ë»3Ãü púw ‰°<Á%»ñž ÿ P+Û^ ¾Ye£ŽCÄŒ„/>˜>•á¶Ìm~&&À>M[hÈÈÿ [Ž•íd…RO@3^Ç(ʽ*¶ÖQZyßþ 1Vº}Ñç?¼O4Rh6R€ª£í¡ûÙ a‚3ß·Õ ü=mRÍ/µ9¤‚0ÑC¼Iè:cŽsÛ¾™x£ÆÐ¬ªÍöˢ샒W$•€Å{¨ÀPG ÀÀàŸZìÍ1RÉ0´ðxEË9+Éÿ ^rEÕ—±Š„70l¼áË@û.' ¼¹Žz€N3úUÉ<3á×*?²¬‚ä†"Ùc=p íÛ'¡ª1ñ"økJ†HÒ'»Ÿ+ oÏN¬Ã9 dÙãÜדÏâÍ~æc+j·Jzâ7(£ðW]•晍?nê´º6åwéåç÷N•ZŠíž›¬|?Ðõ?Ñ-E…®³ÇV$~X¯/…õ x‘LˆÑÜÚÈ7¦pzãÜüë½ðÄ^õtÝYËÍ7ÉÖÕ8ÏUe# #€r=sU¾/é’E§jRC4mxNÝ´9†íuá»›V‘ ZI€­×cr1Ÿpzsøf»¨åV‹ìû`qËLÊIã?\~¼³áËC©êhªOîO»‘ÃmçÛçút×¢x“Z}?Üê#b-¤X7õ Äò gž zzbº3œm*qvs·M=íúéw}¿&Úª°^Ö×µÏ(ø‡â†Öµƒenñý†×åQáYûœ÷ÇLœôÎNk¡ð‡¼/µ¸n0æÉ0¬ƒ‚üîÉÆvŒw®Sáö”š¯‹-üÕVŠØÙ[$`(9cqƒÔ_@BëqûÙ`Ýæ­0;79È?w<ó |ÙÜkßÌ1±Ëã ¿ìÒ»ðlìï«ÓnªèèrP´NÏš&Žéö Ù¸÷æ°~-_O'‰`°!RÚÚÝ%]Ø%þbß1'¿ÿ X՝áOöÎŒ·‹¬+Åæ*ÛÛ™0¤ƒOÍÔ `u¯¦ÂaèÐÃÓ«‹¨Ô¥µœ¿¯ÉyÅÙ.oÔôŸ Úx&(STðݽ¦õ] ’ÒNóÁäÈùr3í·žÚ[™ƒ¼veÈ÷ÞIõÎGlqÎ=M|«gsªxÅI6 ]Z·Îªä,¨zŒŽÄ~#ØŠúFñiÉqc©éÐD>S딑 GñŽ1éÐ^+ Ëi;Ô„µVÕú»i¯ÈÒ-ZÍ]òܘ®ì` bÛÙ¥_/y(@÷qÐúg Ô÷W0.Ø› 6Ò© r>QƒŒ0+Èîzb¨É+I0TbNñ"$~)ÕÒ6Þ‹{0VÆ27œWWñcÄcX×íôûyKZéðªc'iQ¿¯LaWŠŸS\·Š“źʸ…ôÙÂí|öÀÇåV|!¤ÂGâÛ[[’ï 3OrÙËPY¹=Î1õ5öåTžÑè Ú64/üö?Zëžk}¬¶éào፾á}3“ü]8Éæ¿´n²Žš_6¾pœ)2?úWÓÚ¥¾¨iWúdŽq{*ª1rXŒd…m»‰äcô¯–dâ•ã‘Jº¬§¨#¨® §,df«8ÉÅßN¾hˆ;îÓ=7áùpën®É 6ûJžO2^œÐò JÖø¥²ã›Ò6Ü·‰!wbÍ‚¬O©»õ¬ÿ ƒP=Ä:â¤-&ÙŽ ` È9 r9íϧzë> XÅ7ƒ5X–krÑ¢L 7€ìw}ÑŸNHëŒüþ:2†á¼+u·á÷N/Û'Ðç~ߘô«ëh!ónRéeQ´6QÛÿ èEwëÅÒ|¸Yqó1uêyùzð8 ƒŠù¦Ò;¹ä6öi<'ü³„[íZhu½ ùÍ¡g‚>r¯׊îÌx}bñ2“­k꣧oø~›hTèóËWò4|ki"xßQ˜Ï6øÀLnß‚0 ¹Æ{±–¶Öe#¨27È@^Ìß.1N¾œyç€õ†ñeé·Õã†çQ°€=­Ì©ºB€Ø8<‚ÃSõ®ùcc>×Ú .Fr:žÝGæ=kÁâ,^!Fž ¬,àµ}%¶«îõ¹†"r²ƒGœüYÕd?aÑÍY®49PyU ÷þ!žxÅm|/‚ãNð˜¼PcûTÒ,¹/Ý=FkÏ|u¨¶«â녏{¤m¢]Û¾ïP>®XãÞ½iÓÁ¾ ‰'¬–6ß¼(„ï— í!úÙäzôë^–:œ¨å|,_¿&š×]uÓѵÛô4’j”bž§x‘Æ©ã›á,‚[Ô ÎÞ= ŒËæ ÀùYÁ?ŽïÚ¼?ÁªxºÕÛ,°1¸‘¿ÝäãØ¯v…@¤åq½ºã œàûââ·z8Xýˆþz~—û»™âµj=Ž â~ãáh@'h¼F#·Üp?ŸëQü-løvépx»cŸø…lxâÃûG·‰¶ø”L£©%y?¦úõÆü-Õ¶¥y`Òl7>q’2üA?•F}c‡jB:¸Jÿ +§¹¿¸Q÷°ív=VÑìu[Qml%R7a×IèTõéŽx¬ ?†š7 1†îã-ˆã’L¡lŽ0OÓ=ÅuˆpÇ•¼3ÛùÒ¶W/!|’wŽw^qÔ×Ïaó M8Q¨ãÑ?ëï0IEhÄa¸X•`a ?!ÐñùQ!Rä ÂžqŽžÝO`I0ÿ J“y|ñ!Îã@99>þ8–+éáu…!ù—ä ʰ<÷6’I®z ÅS„¾)Zþ_Öýµ×ËPåOwø÷þ*üïænÖùmØÝûþ¹=>¦½öî×Jh]¼ç&@§nTŒ6IT Àõ^Fxð7Å3!Ö·aÛ$þÿ ¹ã5îIo:ȪmËY[’8ÇӾlj*òû¢¥xõ¾¼ú•åk+\ð¯ HÚoŽl•Ûk,¯ ç²²cõÅ{²Z\ ´ìQ åpzŽ3Ôð}ÿ Jð¯XO¡øÎé€hÙ¥ûLdŒ`““ù6Gá^ÃáÝ^Ë[Ñb¾YåŒÊ»dŽ4 †2§,;ÿ CQÄ´¾°¨c–±”mºV{«ßÕýÄW\ÖŸ‘çŸ,çMRÆí“l-ƒn~ë©ÉÈê Ü?#Ž•¹ðãSÒ¥ÐWNíà½;ãž)™ÎSÈ9cóLj뵿Å«iÍk¨ió­¶X‚7÷ƒ€yãnyÏŽëÞ Öt`×À×V's$È9Ú:ä{wÆEk€«†Çàc—â$éÎ.éí~Ýëk}ÅAÆpörÑ¢‡Šl¡ÑüSs‹¨‰IÝ„óÀ×wñ&eºðf™pŒÆ9gŽTø£lñëÀçŽ NkÊUK0U’p ï^¡ãÈ¥´ø{£ÙHp`’ØåbqÏ©äó^Æ: Ž' ÊóM«õz+ß×ó5Ÿ»('¹­ð¦C„$˜Å¢_ºÈI?»^äã'ñêzž+ë€ñ-½»´}¡Ë*õ?.xÇ^1ŽMyǸ&“—L–îëöâ7…' bqéÎGé]˪â1$o²¸R8Ã`.q€}sÖ¾C9­8cêÆÞíïóòvÓòùœÕfÔÚéýu­èÖ·Ú Å‚_¤³ÜۺƑߝ”àרý:׃xPþÅÕî-/üØmnQìïGΊÙRqê=>¢½õnæ·r!—h`+’;ò3È<“Û©éšóŸx*÷V¹¸×tÈiˆßwiÔÿ |cŒñÏ®3Ö½̰‰Ë Qr©ö½®¼ÛoÑÙZÅÑ«O൯ýw8;k›ÿ x†;ˆJa;‘º9÷÷R+¡ñgŽí|Iáë{ôáo2ʲ9 029ÉÏLí\‰¿¸Ÿb˜ "Bv$£&#ßiê>=ªª©f  ’N ëí>¡N­XW­~5×úíø\‰»½Ï^ø(—wÖú¥¤2íŽÞXæÁ$ °eÈ888^nÝë²ñÝÔ^ ÖÚ9Q~Ëå7ï DC¶ÑµƒsËÇè9®Wáþƒ6‡£´·°2\Ý:ÈÑ?(#¨'$õèGJ¥ñW\ÿ ‰E¶—¸™g˜ÌÀ¹;Pv ú±ÎNs·ëŸ’–"Ž/:té+ûË]öJöÓM»ëø˜*‘•^Uý—êd|‰åñMæÔÝ‹23å™6æHùÛ‚ëüñ^…ñ1¢oêûÑEØ.õ7*ÅHtÎp{g<·Á«+¸c¿¿pÓ¾Æby=8É_ÄsÆk¬ñB\jÞÔì••Ë[9Píb‹Bヅ =9­3§ð§LšÛáÖšÆæXÌÞdÛP.0\ãïÛ0?™úJ¸™Ë ”•œº+=<µI£¦í¯õêt¬d‹T¬P=ËFêT>ÍØØ@Ï9<÷AQÌ×»Õ¡xùk",JÎæù±Éç$œŽŸZWH®¯"·UÌQ ’ÙÈ]ÅXg<ã ߨg3-Üqe€0¢¨*Œ$܃ ’Sû 8㎼_/e'+Ï–-èÓ¶¶Õíß[·ÙÙ½î쏗¼sk%§µxä‰â-pÒeÆCrú ôσžû=”šÅô(QW‚Õd\ƒæ. \àö¹¯F½°³½0M>‘gr÷q+œ¶NïºHO— ¤ ܥݭ”n·J|ÆP6Kµc=Isó}Ò çGš)a=—#vK›åoK§ßóٍ¤¶¿õú…ÄRÚ[Ësöټˏ•Ë ópw®qœŒ·Ø ùÇâ‹ý‡ãKèS&ÞvûD Aù‘É9 ŒîqÅ} $SnIV[]ѐ´Ó}ØÜ¾A Ü|½kÅþÓ|E Mu R¼.I¼¶däò‚ÃkÆ}ðy¹vc iUœZ…­Õõ»z¾÷¿n¦*j-É­/àœHã\y5 Û ß™ó0— äŸnzôã#Ô¯,†¥ÚeÔ÷ÜÅ´„“'c…<íÝ€<·SŠ¥k§Ã¢éÆÆÙna‚8–=«ʪ[Ÿ™°pNî02z“ÔÙ–K8.È’Þî(vƒ2®@ äÈûãçžxäÇf¯ˆu¹yUÕîýWšÙ|›ëÒ%Q^í[æ|éo5ZY•^{96ˆY‚§v*x>âº_|U¹Ö´©tûMÒÂ9PÇ#«£#€ éÉñ‘ƒÍz/‰´-į¹°dd,Б›p03ƒœ{ç9=+ Ûᧇ¬¦[‡‚ê婺¸#±ß=³ý¿•Õµjñ½HÙh›Û[§ÚýÊöô÷{˜?ô÷·Ô.u©–_%còcAÀ˜’ }0x9Î>žñÇáÍ9,ahï¦Ì2òÓ ñÛAäry$V²Nð ]=$Ž ‚#Ù‚1ƒƒødõMax‡ÂÖ^!±KkÛ‘ «“Çó²FN8+ëÎ{Ò¼oí§[«ÕMRoËeç×[_m/¦¦k.kôgŽxsSÓ´ý`êzªÜÜKo‰cPC9ÎY‰#§^üý9¹âïÞx£Ë·Ú`±‰‹¤;³–=ÏaôÕAð‚÷kêÁNBéÎælcõö®£Fð†ô2Ò¬]ßÂK$ÓÜ®•”/ÊHàã$ä ¸÷ëf¹Oµúâ“”’²ø­è´µþöjçNü÷üÌ¿ xNïFÒd»¼·h®îT9ŽAµÖ>qÁçÔœtïÒ»\ȶÎîcÞäîó3¶@#ÉIÎ ÔñW.<´’¥–ÑÑ€ÕšA‚ ;†qÓë‚2q ÒÂó$# Çí‡ !Ë}Õ9ÈÎÑÉã=;ŒÇÎuñ+ÉûÏ¥öíeÙ+$úíÜ娯'+êZH4ƒq¶FV‹gïŒ208ÆÌ)íб>M|÷âÍã¾"iì‹¥£Jd´™OÝç;sÈúr+ÜäˆË)DŒ¥šF°*3Õ”d {zÔwºQ¿·UžÉf†~>I+ŒqÔ`ð3œ“Ü×f]œTÁÔn4“ƒø’Ýßõ_«*5šzGCÊ,þ+ê1ò÷O¶¸cœºb2yÇ;cùÕ£ñh¬›áÑŠr¤ÝäNBk¥—á—†gxšX/쑘hŸ*Tçn =û㦠2|(ð¿e·ºÖ$ ýìŸ!'åΰyîî+×öœ=Y:²¦ÓÞ×iü’—ü -BK™£˜›âÆ¡&véðõ-ûÉY¹=Onj¹ø¯¯yf4·±T Pó`çœ7={×mÃ/ ¢˜ZÚòK…G½¥b„’G AãÜœ*í¯Ã¿ IoæI¦NU8‘RwÈã;·€ Û×ëÒ”1Y •£E»ÿ Oyto¢<£Áö·šï,䉧ûA¼sû»Nò}¹üE{ÜÖªò1’õÞr0â}ÎØ#>à/8ïéÎ~—áÍ#ñÎlí§³2f'h”?C÷YËdð:qëõÓ·‚ïeÄ© ÔÈØÜRL+žAÎ3¼g=åšó³Œt3 ÑQ¦ùRÙßE®¼±w_;þhš’Sirÿ ^ˆã¼iੇ|RòO„m°J/“$·l“ ÇÓ¿ÿ [ÑŠÆ“„†Õø>cFÆ6Ø1ƒ– àz7Ldòxäüwá‹ÝAXùO•Úý’é®ähm­ •NÀ±ÌTÈç ƒ‘I$pGž:‚ÄbêW¢®œ´|­¦­nÍ>¶ÖÏ¢§ÎÜ¢ºö¹•%ÄqL^öÛ KpNA<ã¡ …î==ª¸óffËF‡yÌcÉ ©ç$ð=ñÏ­YþÊ’Ú]—¥‚¬‚eDïÎH>Ÿ_ÌTP™a‰ch['çÆÜò7a‡?w°Ïn§âÎ5”’¨¹uÚÛ|´ÓÓc§{O—ü1•ªxsÃZ…ÊÏy¡Ã3¸Ë2Èé» ‘ƒÎ äžÜðA§cáOéúÛ4ý5-fŒï„ù¬ûô.Ç Üsž•Ò¾•wo<¶Ÿ"¬¡º|£ î2sÇ¡éE²ÉFѱrU°dÜ6œ¨ mc†Îxë׺Þ'0²¡Rr„{j¾í·è›µ÷)º·å–‹î2|I®Y¼ºÍË·–ÃÆà㍣'óÆxƒOÆÞ&>\lóÌxP Xc¸ì Sþ5§qà/ê>#žÞW¸if$\3 ® ûÄ“ùŽÕê¾ð<Ó‹H¶óÏ" å·( á‘€:ã†8Ï=+ꨬUA×ÃËÚT’ÑÞöù¥¢]{»ms¥F0\ÑÕ—ô}&ÛB´ƒOŽÚ+›xíÄÀ1 ,v± žIëíZ0ǧ™3 í2®0ทp9öÝÔž)ÓZËoq/Ú“‘L ²ŒmùŽÓ9§[Û#Ä‘\ÞB¬Çs [;à à«g‚2ôòªœÝV§»·¯/[uó½õÛï¾ /šÍ}öüÿ «=x»HŸÂÞ.™ ÌQùŸh´‘#a$‚'¡u<Š›Æ>2>+ƒLSiöwµFó1!eg`£åœ ÷ëÛö}Á¿ÛVÙêv $¬ƒ|,s÷z€ð΃¨x÷ÅD\ÜŒÞmåÔ„ ˆ o| :{ÇÓ¶–òÁn!´0Ål€, ƒ ( ÛŒŒ c¶rsšæ,4‹MÛOH!@¢ ÇŽ„`å²9ÝÃw;AÍt0®¤¡…¯ØÄ.Àì클ƒ‘ßñ5Í,Óëu-ÈÔc¢KÃÓ£òÖ̺U.õL¯0…%2È—"~x ‚[`có±nHàŽyàö™¥keˆìŒÛFç{(Ø©†`Jã#Žwg<“:ÚÉ;M ^\yhûX‡vB·÷zrF?§BÊÔ/s<ÐÈB)Û± ·ÍÔwç5Âã:så§e{mѤï«Òíh—]Wm4âí¿ùþW4bC3¶ª¾Ùr$ pw`àädzt!yŠI„hÂîàM)!edŒm'æ>Ç?wzºK­ìcŒ´¯Ìq6fp$)ãw¡éUl`µ»ARAˆÝÕgr:äŒgƒéé[Ôö±”iYs5Ýï«ÙG—K=þF’æMG«óÿ `ŠKɦuOQ!ÕåŒ/ÎGÞ`@ËqÕzdõâ«Ê/Ö(ƒK´%ŽbMü åÜŸö—>¤óŒŒV‘°„I¢Yž#™¥ùÏÊ@8 œgqöö5ª4vד[¬(q cò¨À!FGaÁõõ¯?§†¥ÏU½í¿WªZ$úyú½Žz×§Éþ?>Ã×È•6°{™™ŽÙ.$`­ÎUœ…çè ' ¤r$1Ø(y7 ðV<ž:È  ÁÎMw¾Â'Øb§øxb7gãО½óÉÊë²,i„Fȹ£§8ãä½k¹¥¦ê/ç{ïê驪2œ/«ü?¯Ô›ìñÜ$þeýœRIåŒg9Ác’zrrNO bÚi¢ ѺË/$,“ª¯Ýä;Œ× ´<ÛÑn³IvŸb™¥ nm–ÄŸ—nÝÀãŽ3ëÍG,.öó³˜Ù£¹u ÊÌrŠ[<±!@Æ:c9ÅZh ì’M5ÄìÌ-‚¼ëÉùqŽGì9¬á ;¨A-ž—évþÖ–^ON·Ô”ŸEý}ú×PO&e[]ÒG¸˜Ûp ƒÃà/Ë·8ûÀ€1ž@¿ÚB*²­¼ñì8@p™8Q“žÆH'8«I-%¸‚ F»“åó6°Uù|¶Ú¸ã ò^Äw¥ŠÖK–1ÜÝK,Žddlí²0PÀü“×ükG…¯U«·¶–´w¶ŽÍ¾©yÞú[Zös•¯Á[™6° ¨¼ÉVæq·,# ìãï‘×8îry®A››¨,ãc66»Ë´ã'æÉù?t}¢æH--Òá"›|ˆ¬[í  7¶ö#¸9«––‹$,+Ëqœ\Êø c€yê^ݸÄa°«™B-9%«×®‹V´w~vÜTéꢷþ¼ˆ%·¹• ’[xç•÷2gØS?6åÀÚ õ9É#š@÷bT¸º²C*3Bá¤òÎA9 =úU§Ó"2Ãlá0iÝIc‚2Î@%öç94ùô»'»HÄ¥Ô¾@à Tp£šíx:úÊ:5eºßMý×wµ›Ó_+šº3Ýyvÿ "ºÇ<ÂI>Õ 1G·Ë«È«É# àÈÇ øp Jv·šæDûE¿›†Ë’NFr2qŸ½ÇAÜšu•´éí#Ħ8£2”Ú2Ã/€[ÎTr;qŠz*ý’Îþ(≠;¡TÆâ›;ºÿ àçœk‘Þ­8¾Uª¾íé{^×IZéwÓkXÉûÑZo¯_øo×È¡¬ â–ÞR§2„‚Àœü½ùç® SVa†Âüª¼±D‘ŒísŸàä|ä2 æ[‹z”¯s{wn„ÆmáóCO+†GO8Ïeçåº`¯^¼ðG5f{Xžä,k‰<á y™¥voÆ éÛõëI=œ1‹éíÔÀÑ)R#;AÂncäŽ:tÏ#¶TkB.0Œ-ÖÞZÛgumß}fÎJÉ+#2êÔP£žùÈÅi¢%œ3P*Yƒò‚Aì“Ž2r:ƒÐúñi­RUQq‰H9!”={~¼ “JŽV¥»×²m.ÛߺiYl¾òk˜gL³·rT• ’…wHÁ6ä`–Î3ùÌ4Øe³†&òL‘•%clyîAÂäà0 žüç$[3uŘpNOÀÉ=† cï{rYK ååä~FÁ •a»"Lär1Ó¯2Äõæ<™C•.fÕ»è¥~½-¿g½Â4¡{[ør¨¶·Žõäx¥’l®qpwÇ»8ärF \cޏܯÓ-g‚yciÏÀ¾rÎwèØÈ#o°Á9ã5¢šfÔxÞæfGusÏÌJÿ µ×œ/LtãÅT7²¶w,l ɳ;”eúà·¨çîŒsÜgTÃS¦­^ '~‹®›¯+k÷ZÖd©Æ*Ó[Ü«%Œk0ŽXƒ”$k#Ȩ P2bv‘ƒŸáÇ™ÆÕb)m$É*8óLE‘8'–ÜN Úyàúô­+{uº±I'wvš4fÜr íì½=úuú sFlìV$‘ö†Hсù€$§ õ=½¸«Ž] :Ž+•¦ïmRþ½l´îÊT#nkiøÿ _ðÆT¶7Ò½ºÒ£Î¸d\ã8=yãŽÜäR{x]ZâÚé#¸r²#»ÎHÆ6õ ç® ÎFkr;sºÄ.&;só± Ç9êH÷ýSšÕ­tÐU¢-n­ Ì| vqœ„{gŒt§S.P‹’މ_[;m¥Þ­ZýRûÂX{+¥úü¼ú•-àÓ7!„G"“´‹žƒnrYXã¸îp éœ!Ó­oP̏tÑ (‰Þ¹é€sÓ#GLçÕšÑnJý¡!‘Tä#“ß?îýp}xÇ‚I¥Õn#·¸–y'qó@r[ Êô÷<ÔWÃÓ¢áN¥4ԝ’I&ݼ¬¬¼ÞºvéÆ FQV~_ÒüJÖÚt¥¦Xá3BÄP^%ÈÎW-×c¡ú©¤·Iþèk¥š?–UQåIR[’O 5x\ÉhÆI¶K4«2ùªŠŒ<¼óœçØ`u«‚Í.VHä € Ëgfx''9ÆI#±®Z8 sISºku¢ßÞ]úk»Jößl¡B.Ü»ÿ MWe °·Ž%šêɆ¼»Âù³´œ O¿cÐÓÄh©"ÛÜÏ.ÖV ’3nüÄmnq[ŒòznšÖ>J¬òˆæ…qýØP Ž:ä7^0yëWšÍ_79äoaÈ °#q0{ää×mœy”R{vÒÞ¶ÚÏe¥“ÚÆÐ¥Ì®—õýjR •íç›Ìb„+J yÜØÙ•Ç]¿Ôd þËOL²”9-Œ—õÃc'æÝלçÚ²ìejP“½ âù°¨†ðqòädЃÉäÖÜj÷PÇp“ÍšŠå«‘î <iWN­smª»¶vÓz5»ûì:Rs\Ðßôû×uÔÿÙ