Skip to content

Commit

Permalink
removed warning for bits overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ebertolazzi committed Feb 20, 2021
1 parent 76840fe commit fa763d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/PolynomialRoots-Utils.hh
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,16 @@
..
*/

#include <cstdint>

namespace PolynomialRoots {

typedef double valueType;
typedef int indexType;
typedef std::complex<valueType> complexType;

static int const bitsValueType = std::numeric_limits<valueType>::digits;
static valueType const splitFactor = (long(1)<<(bitsValueType-2))+1; // one extra digit is implicitly 1
static valueType const splitFactor = static_cast<valueType>((std::uint64_t(1)<<(bitsValueType-2))+1); // one extra digit is implicitly 1

/*
|| _ _ _
Expand Down

0 comments on commit fa763d2

Please sign in to comment.