guanaqo
1.0.0-alpha.27
Utilities for scientific software
Loading...
Searching...
No Matches
quadmath-print.cpp
Go to the documentation of this file.
1
#ifdef GUANAQO_WITH_QUAD_PRECISION
2
3
#include <
guanaqo/quadmath/quadmath-print.hpp
>
4
#include <
guanaqo/quadmath/quadmath.hpp
>
5
6
#include <cassert>
7
#include <ostream>
8
9
namespace
guanaqo
{
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 guanaqo
19
20
#endif
guanaqo::operator<<
std::ostream & operator<<(std::ostream &, TimingsCPU)
Definition
timed-cpu.cpp:31
guanaqo
Definition
blas-interface.hpp:9
quadmath-print.hpp
quadmath.hpp
src
quadmath
quadmath-print.cpp
Generated on
for guanaqo by
1.16.1