timmay3141
Programmer
This is probably the strangest problem I've ever had with C++. I'm multiplying the same two doubles in two different places in the program, using the exact same line of code, and they are giving different values. The values I'm multiplying are 50.0 exactly and 0.001 exactly (I know they are exactly these because I am checking them with the debugger). The first time I multiply them, I get 0.050000000745058 every time I run the program. The second time I multiply them (in another function), I get 0.05 exactly every time I run the program. How is this possible? Is there anything I can do to fix it? Kinda confused here...