Arithmetic Exception with log2() c++

  arithmeticexception, c++, exception, logarithm

I am currently receiving this output when I run this line of code:

Program received signal SIGFPE, Arithmetic exception.
int number = log2 (integer value/integer value);

What could be causing this? My test numbers are 128 and 134217728, i.e. log2(134217728 / 128)

Source: Windows Questions C++

LEAVE A COMMENT