title: Arithmetic Exception in gdb, but I'm not dividing by zero?
body: <p>I've been getting a <code>Floating point exception (core dumped)</code> error in my C++ program, and gdb shows that the problem is on a line that performs modulo division:</p>
  
  <pre><code>Program received signal SIGFPE, Arithmetic exception.
  [Switching to Thread 0x7ffff6804700 (LWP 13931)]
  0x00000000004023e8 in CompExp::eval (this=0x7fffec000e40, currVal=0)
      at exp.cpp:55
  55              return (r==0) ? 0 : l % r;
  </code></pre>
  
  <p>The line guards against dividing by zero, and my backtrace shows the following:</p>
  
  <pre><code>#0  0x00000000004023e8 in CompExp::eval (this=0x7fffec000e40, currVal=0)
      at exp.cpp:55
          l = -2147483648
          r = -1
  </code></pre>
  
  <p>Since I know I'm not dividing by zero, what else could possibly be causing the exception?</p>