Why and when you want a function to convert char to double value