alpaqa
1.0.0a15
Nonconvex constrained optimization
Loading...
Searching...
No Matches
src
alpaqa
src
util
quadmath
quadmath-print.cpp
Go to the documentation of this file.
1
#ifdef ALPAQA_WITH_QUAD_PRECISION
2
3
#include <
alpaqa/util/quadmath/quadmath-print.hpp
>
4
#include <
alpaqa/util/quadmath/quadmath.hpp
>
5
6
#include <cassert>
7
#include <ostream>
8
9
namespace
alpaqa
{
10
std::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
alpaqa
Definition
anderson.hpp:10
alpaqa::operator<<
std::ostream & operator<<(std::ostream &os, PANOCStopCrit s)
Definition
panoc-stop-crit.cpp:7
alpaqa::inf
constexpr const auto inf
Definition
config.hpp:85
quadmath-print.hpp
quadmath.hpp
Generated on Wed Nov 22 2023 for alpaqa by
1.9.8