title: exponential function with large argument in matlab
body: <p>I've got one problem for a longer time and I'd be really grateful if you could help me somehow...</p>
  
  <p>I have a code in MATLAB (version R2012a) where I compute some exponential functions using MATLAB's fuction <code>exp</code>. This means that I have something like this:</p>
  
  <pre><code>y = exp(x);
  </code></pre>
  
  <p>However, when this "x" is larger than a certain number, the result ("y") is infinity; when "x" is smaller than a certain number, the result is 0. As said on the MathWorks' website:</p>
  
  <blockquote>
    <p>Numerical exceptions may happen, when the absolute value of the real
    part of a floating-point argument x is large. If ℜ(x) &lt; -7.4*10^8,
    then exp(x) may return the truncated result 0.0 (protection against
    underflow). If ℜ(x) > 7.4*10^8, then exp(x) may return the
    floating-point equivalent RD_INF of infinity.</p>
  </blockquote>
  
  <p>My problem is quite obvious - my "x" are pretty large so I receive infinities and zeros instead of results I need. My question is - how do I get the real results? Thanks in advance for help!</p>