I have a program that reads a number from an Access database. The number is stored in a table as a "single". Now the number is handled by my program and stored in an XML file. Later the program may read the XML file again.
Now my problem is in the database stands the number "3.001277". This is read from the database with help of COleSafeArray::GetElement and the debugger shows the number "3.001277". In hex the value 0x404014eD. When the number is written to the XML file it writes "3.001277" in ascii. But when the number is then read from the XML file the debugger shows it read 3.001277 but the hex value is =x404014eC. So the last hex digit differs with one.
How can I make my conversions so I get the same number?