boostorg / boostorg/multiprecision
Parse and Print Hexadecimal floating point literals?
- Dominant language
- C++
- Stars
- 265
- Forks
- 128
- Avg merge
- 4h 48m
- Merged PRs (30d)
- 2
Description
Would it be nice to have the ability to parse and print hexadecimal floating point literals in multprecision? float128 can parse as a hexadecimal, but not print (maybe a quadmath enhancement rather than Boost.Multiprecision?) but `cpp_bin_float_50` can neither parse nor print.
```cpp
#include
#include
#include
using boost::multiprecision::cpp_bin_float_50;
using boost::multiprecision::float128;
int main()
{
float128 x = 7;
std::cout << std::hexfloat << x << "\n";
cpp_bin_float_50 y = 7;
std::cout << std::hexfloat << y << "\n";
float128 z = 0x1p1Q;
std::cout << "z = " << z << "\n";
cpp_bin_float_50 w{"0x1p1"};
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.