I have a string that I want to convert to a double using std::stod. However, the output of std::stod is not what I would expect. For example, if my string is 6.1, the output of std::stod is 6.0999999999999996.
Is there anything I can do to either make it so std::stod returns 6.1 or to convert the 6.099...6 to 6.1?