<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="precision-math-numbers">
      </a>
      14.24.1 Types of Numeric Values
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045190499376">
  </a>
  <a class="indexterm" name="idm46045190498288">
  </a>
  <a class="indexterm" name="idm46045190497200">
  </a>
  <a class="indexterm" name="idm46045190495712">
  </a>
  <p>
   The scope of precision math for exact-value operations includes
      the exact-value data types (integer and
   <a class="link" href="fixed-point-types.html" title="13.1.3 Fixed-Point Types (Exact Value) - DECIMAL, NUMERIC">
    <code class="literal">
     DECIMAL
    </code>
   </a>
   types) and exact-value
      numeric literals. Approximate-value data types and numeric
      literals are handled as floating-point numbers.
  </p>
  <p>
   Exact-value numeric literals have an integer part or fractional
      part, or both. They may be signed. Examples:
   <code class="literal">
    1
   </code>
   ,
   <code class="literal">
    .2
   </code>
   ,
   <code class="literal">
    3.4
   </code>
   ,
   <code class="literal">
    -5
   </code>
   ,
   <code class="literal">
    -6.78
   </code>
   ,
   <code class="literal">
    +9.10
   </code>
   .
  </p>
  <p>
   Approximate-value numeric literals are represented in scientific
      notation with a mantissa and exponent. Either or both parts may be
      signed. Examples:
   <code class="literal">
    1.2E3
   </code>
   ,
   <code class="literal">
    1.2E-3
   </code>
   ,
   <code class="literal">
    -1.2E3
   </code>
   ,
   <code class="literal">
    -1.2E-3
   </code>
   .
  </p>
  <p>
   Two numbers that look similar may be treated differently. For
      example,
   <code class="literal">
    2.34
   </code>
   is an exact-value (fixed-point)
      number, whereas
   <code class="literal">
    2.34E0
   </code>
   is an approximate-value
      (floating-point) number.
  </p>
  <p>
   The
   <a class="link" href="fixed-point-types.html" title="13.1.3 Fixed-Point Types (Exact Value) - DECIMAL, NUMERIC">
    <code class="literal">
     DECIMAL
    </code>
   </a>
   data type is a
      fixed-point type and calculations are exact. In MySQL, the
   <a class="link" href="fixed-point-types.html" title="13.1.3 Fixed-Point Types (Exact Value) - DECIMAL, NUMERIC">
    <code class="literal">
     DECIMAL
    </code>
   </a>
   type has several synonyms:
   <a class="link" href="fixed-point-types.html" title="13.1.3 Fixed-Point Types (Exact Value) - DECIMAL, NUMERIC">
    <code class="literal">
     NUMERIC
    </code>
   </a>
   ,
   <a class="link" href="fixed-point-types.html" title="13.1.3 Fixed-Point Types (Exact Value) - DECIMAL, NUMERIC">
    <code class="literal">
     DEC
    </code>
   </a>
   ,
   <a class="link" href="fixed-point-types.html" title="13.1.3 Fixed-Point Types (Exact Value) - DECIMAL, NUMERIC">
    <code class="literal">
     FIXED
    </code>
   </a>
   . The integer types also are
      exact-value types.
  </p>
  <p>
   The
   <a class="link" href="floating-point-types.html" title="13.1.4 Floating-Point Types (Approximate Value) - FLOAT, DOUBLE">
    <code class="literal">
     FLOAT
    </code>
   </a>
   and
   <a class="link" href="floating-point-types.html" title="13.1.4 Floating-Point Types (Approximate Value) - FLOAT, DOUBLE">
    <code class="literal">
     DOUBLE
    </code>
   </a>
   data types are
      floating-point types and calculations are approximate. In MySQL,
      types that are synonymous with
   <a class="link" href="floating-point-types.html" title="13.1.4 Floating-Point Types (Approximate Value) - FLOAT, DOUBLE">
    <code class="literal">
     FLOAT
    </code>
   </a>
   or
   <a class="link" href="floating-point-types.html" title="13.1.4 Floating-Point Types (Approximate Value) - FLOAT, DOUBLE">
    <code class="literal">
     DOUBLE
    </code>
   </a>
   are
   <a class="link" href="floating-point-types.html" title="13.1.4 Floating-Point Types (Approximate Value) - FLOAT, DOUBLE">
    <code class="literal">
     DOUBLE PRECISION
    </code>
   </a>
   and
   <a class="link" href="floating-point-types.html" title="13.1.4 Floating-Point Types (Approximate Value) - FLOAT, DOUBLE">
    <code class="literal">
     REAL
    </code>
   </a>
   .
  </p>
 </div>
 <br/>
</div>
