src/tools/tools.hpp
// Convert floating number to scientific notation
Convert floating number to scientific notation
Convert floating number to scientific notation
inline std::string ld2ss(long double p)
    {
        if (std::isnan(p) || !std::isfinite(p))
        {
            return "-";
        }
        std::ostringstream out;
        out << std::scientific << p;
        return out.str();
    }
inline std :: string ld2ss ( long double p ) { if ( std :: isnan ( p ) || ! std :: isfinite ( p ) ) { return " " ; } std :: ostringstream out ; out << std :: scientific << p ; return out . str ( ) ; }
Convert floating number to scientific notation
Convert floating number to scientific notation
// Convert the probability into scientific notation