Double approximation using lexical_cast

33 views Asked by At

When I use following line of code

std::wcout << boost::lexical_cast<std::wstring>(5.453) << std::endl;

I obtain the following result on the console

5.4530000000000003

What's be best way to approximate the number in order to obtain the same number that I use for conversion?

0

There are 0 answers