use fabsl() for long doubles
use fabs() instead of abs()
use correct format specifier