I am having the negative floating point number as:
a = -0.340515;
to convert this into positive number I used the abs() method as:
Well, in mathematics to convert a negative number to a positive number you just need to multiple the negative number by -1;
Then your solution could be like this:
a = a * -1;
or shorter:
a *= -1;