Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions libc/src/__support/FPUtil/double_double.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@
namespace LIBC_NAMESPACE_DECL {
namespace fputil {

#define DEFAULT_DOUBLE_SPLIT 27

template <typename T> struct DefaultSplit;
template <> struct DefaultSplit<float> {
static constexpr size_t VALUE = 12;
};
template <> struct DefaultSplit<double> {
static constexpr size_t VALUE = DEFAULT_DOUBLE_SPLIT;
static constexpr size_t VALUE = 27;
};

using DoubleDouble = NumberPair<double>;
Expand Down
2 changes: 1 addition & 1 deletion libc/src/math/generic/range_reduction_double_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
namespace LIBC_NAMESPACE_DECL {

#ifdef LIBC_TARGET_CPU_HAS_FMA
static constexpr unsigned SPLIT = DEFAULT_DOUBLE_SPLIT;
static constexpr unsigned SPLIT = fputil::DefaultSplit<double>::VALUE;
#else
// When there is no-FMA instructions, in order to have exact product of 2 double
// precision with directional roundings, we need to lower the precision of the
Expand Down