alpaqa 1.0.0a11
Nonconvex constrained optimization
Loading...
Searching...
No Matches
quadmath-print.cpp
Go to the documentation of this file.
1#ifdef ALPAQA_WITH_QUAD_PRECISION
2
5
6#include <cassert>
7#include <ostream>
8
9namespace alpaqa {
10std::ostream &operator<<(std::ostream &os, __float128 f) {
11 char buf[128];
12 auto precision = static_cast<int>(os.precision());
13 [[maybe_unused]] int n =
14 quadmath_snprintf(buf, sizeof(buf), "%#.*Qg", precision, f);
15 assert((size_t)n < sizeof buf);
16 return os << buf;
17}
18} // namespace alpaqa
19
20#endif
std::ostream & operator<<(std::ostream &os, PANOCStopCrit s)