As in this question is said, there is some differences between negative and positive zero in floating point numbers. I know it\'s because of some important reasons. what I w
How about:
cout << (value == 0.0 ? abs(value) : value) << endl;