I am having the negative floating point number as:
a = -0.340515;
to convert this into positive number I used the abs() method as:
abs() is for integers only. For floating point, use fabs() (or one of the fabs() line with the correct precision for whatever a actually is)
abs()
fabs()