Lines 26-31
Link Here
|
26 |
#include <string> |
26 |
#include <string> |
27 |
#include <limits> |
27 |
#include <limits> |
28 |
#include <stdexcept> |
28 |
#include <stdexcept> |
|
|
29 |
#include <sstream> |
30 |
#include <locale> |
29 |
#include <boost/multiprecision/detail/standalone_config.hpp> |
31 |
#include <boost/multiprecision/detail/standalone_config.hpp> |
30 |
#include <boost/multiprecision/number.hpp> |
32 |
#include <boost/multiprecision/number.hpp> |
31 |
#include <boost/multiprecision/detail/fpclassify.hpp> |
33 |
#include <boost/multiprecision/detail/fpclassify.hpp> |
Lines 1603-1609
double cpp_dec_float<Digits10, ExponentType, Allocator>::extract_double() const
Link Here
|
1603 |
: -std::numeric_limits<double>::infinity()); |
1605 |
: -std::numeric_limits<double>::infinity()); |
1604 |
} |
1606 |
} |
1605 |
|
1607 |
|
1606 |
return std::strtod(str(std::numeric_limits<double>::digits10 + (2 + 1), std::ios_base::scientific).c_str(), nullptr); |
1608 |
std::stringstream ss; |
|
|
1609 |
ss.imbue(std::locale::classic()); |
1610 |
|
1611 |
ss << str(std::numeric_limits<double>::digits10 + (2 + 1), std::ios_base::scientific); |
1612 |
|
1613 |
double d; |
1614 |
ss >> d; |
1615 |
|
1616 |
return d; |
1607 |
} |
1617 |
} |
1608 |
|
1618 |
|
1609 |
template <unsigned Digits10, class ExponentType, class Allocator> |
1619 |
template <unsigned Digits10, class ExponentType, class Allocator> |
Lines 1642-1648
long double cpp_dec_float<Digits10, ExponentType, Allocator>::extract_long_doubl
Link Here
|
1642 |
: -std::numeric_limits<long double>::infinity()); |
1652 |
: -std::numeric_limits<long double>::infinity()); |
1643 |
} |
1653 |
} |
1644 |
|
1654 |
|
1645 |
return std::strtold(str(std::numeric_limits<long double>::digits10 + (2 + 1), std::ios_base::scientific).c_str(), nullptr); |
1655 |
std::stringstream ss; |
|
|
1656 |
ss.imbue(std::locale::classic()); |
1657 |
|
1658 |
ss << str(std::numeric_limits<long double>::digits10 + (2 + 1), std::ios_base::scientific); |
1659 |
|
1660 |
long double ld; |
1661 |
ss >> ld; |
1662 |
|
1663 |
return ld; |
1646 |
} |
1664 |
} |
1647 |
|
1665 |
|
1648 |
template <unsigned Digits10, class ExponentType, class Allocator> |
1666 |
template <unsigned Digits10, class ExponentType, class Allocator> |