diff --git a/include/Algo/Export/exportVol.hpp b/include/Algo/Export/exportVol.hpp index c348a10e8a9993ceaacd8167af7dd4a3765902b1..bf099fb0038f8c5dbbbc9a562ead8f67b198a8dd 100644 --- a/include/Algo/Export/exportVol.hpp +++ b/include/Algo/Export/exportVol.hpp @@ -46,6 +46,15 @@ inline std::string truncFloatTO8(float f) std::stringstream ss; ss << f; std::string res = ss.str(); + + size_t expo = res.find('e'); + if (expo != std::string::npos) + { + if ( res[expo+2] == '0') + return res.substr(0,6) + res[expo+1] + res[expo+3]; + + return res.substr(0,5) + res.substr(expo+1); + } return res.substr(0,8); }