use llabs() instead of abs() for delta

delta is of type INT8, which is typedef'd as int64_t  which in turn is
defined as "long long" on most platforms. cast "delta" to "long long"
before being passed to llabs() to ensure the expected type.
use llabs() instead of abs()

INT8 is typedef'd as int64_t  which in turn is defined as "long long" on
most platforms. cast to "long long" before being passed to llabs() to
ensure the expected type.
use fabs() for floating point
tmpval is a float, use fabs()
use fabs() for floating point
n is an integer, use abs()
use fabs() for floating point
use fabs() for floating point