title: Postgres Trunc return of ST_Area() postGIS
body: <blockquote>
    <p>PostgreSQL 8.4.19 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.4.real
    (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3, 64-bit</p>
    
    <p>POSTGIS="1.4.0" GEOS="3.1.0-CAPI-1.5.0" PROJ="Rel. 4.7.1, 23 September
    2009" USE_STATS</p>
  </blockquote>
  
  <p>I have a procedure that do a simple select:</p>
  
  <pre><code>overlappingArea      float8;
      select ST_Area(st_intersection(table1.geometry, fable2.geometry)) into overlappingArea;
  </code></pre>
  
  <p>The return for the function ST_Area should be a float8 </p>
  
  <p>It happens in order to give me the intersection between two polygons.</p>
  
  <p>The value that I got into the variable <em>overlappingArea</em> is    <strong>2.37783222019061e-05</strong></p>
  
  <p>I use it to get the value of table1 over table 2:</p>
  
  <pre><code> select
        (overlappingArea / st_area(table1.geometry)) * 100
      into pctOverlappingAreaAB;
  </code></pre>
  
  <p>And it works! the problem is when I do a simple if like that</p>
  
  <pre><code>if (overlappingArea &gt; 0.10 ) then ....
  </code></pre>
  
  <p>It always return false, also if I try truncate the value like this:</p>
  
  <pre><code>trunc(overlappingArea)
  </code></pre>
  
  <p>I got 0 why?</p>