title: Handling NaN, Infinity and numbers larger than double precision in Fortran?
body: <p>I am currently running a computation model in Fortran. During calculation, sometimes I got "NaN", "Infinity" and numbers larger than double precision (shows as **************). And I need to detect them. I can detect "NaN" with the following command.</p>
  
  <pre><code>if(isnan(result))then
     continue = .false.
  else
     continue = .true.
  endif
  </code></pre>
  
  <p>I don't know how to detect "Infinity" and "************" (numbers larger than double precision).</p>
  
  <p>How do I do this?</p>