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