1#ifndef included_extended_int
2#define included_extended_int
11#include "AMP/utils/UtilityMacros.h"
41 explicit constexpr int64N(
int rhs );
44 explicit constexpr int64N( int64_t );
47 explicit constexpr int64N( uint64_t );
50#ifdef __SIZEOF_INT128__
52 explicit constexpr int64N( __int128 );
53 explicit constexpr int64N(
unsigned __int128 );
62 explicit constexpr int64N(
const char * );
65 constexpr operator int()
const;
68 constexpr operator int64_t()
const;
71 constexpr operator float()
const;
74 constexpr operator double()
const;
77 constexpr operator long double()
const;
80 constexpr operator bool()
const;
86 constexpr std::array<char, 16 * N + 3>
hex(
bool fixedWidth =
true )
const;
89 inline operator std::string()
const {
return hex().data(); }
124 inline double log10()
const {
return 0.301029995663981 *
log2(); }
177class numeric_limits<
AMP::extended::int64N<N>>
180 static constexpr bool is_specialized =
true;
181 static constexpr bool is_signed =
true;
182 static constexpr bool is_integer =
true;
183 static constexpr bool is_exact =
true;
184 static constexpr bool has_infinity =
false;
185 static constexpr bool has_quiet_NaN =
false;
186 static constexpr bool has_signaling_NaN =
false;
187 static constexpr float_denorm_style has_denorm = denorm_absent;
188 static constexpr bool has_denorm_loss =
false;
189 static constexpr float_round_style round_style = round_toward_zero;
190 static constexpr bool is_iec559 =
false;
191 static constexpr bool is_bounded =
true;
192 static constexpr bool is_modulo =
false;
193 static constexpr int digits = 64 * N - 1;
194 static constexpr int digits10 = ( 64 * N - 1 ) * 0.301029995663981;
195 static constexpr int max_digits10 = 0;
196 static constexpr int radix = 2;
197 static constexpr int min_exponent = 0;
198 static constexpr int min_exponent10 = 0;
199 static constexpr int max_exponent = 0;
200 static constexpr int max_exponent10 = 0;
201 static constexpr bool traps =
true;
202 static constexpr bool tinyness_before =
false;
226#include "AMP/utils/extended_int.hpp"
constexpr bool operator<(const int64N &) const
constexpr int64N & operator-=(const int64N &)
constexpr int64N(int rhs)
Create from int.
constexpr bool operator<=(int) const
constexpr int64N & operator/=(const int64N &)
constexpr int64N & operator+=(const uint64_t)
constexpr int64N(int64_t)
Create from int64.
constexpr int64N()
Empty constructor.
constexpr bool operator>=(int) const
constexpr int64N & operator+=(const int64N &)
constexpr void compliment()
Convert to the 2's compliment of the number (equivalent to multiplying by -1)
constexpr int64N(int64N &&)=default
Move constructor.
constexpr int64N(const int64N &)=default
Copy constructor.
double log10() const
Calculate the log base 2.
constexpr std::array< char, 16 *N+3 > hex(bool fixedWidth=true) const
Get the hexadecimal number as a char array.
constexpr bool operator==(const int64N &) const
Overload comparison operators.
constexpr int64N & operator<<=(unsigned)
Bitshift operators.
constexpr bool operator<(int) const
constexpr bool operator==(int) const
constexpr int sign() const
Get the sign of the number.
constexpr int64N< N > & operator=(const int64N< N > &)=default
Assignment operator.
constexpr int64N & operator*=(const int64N &)
constexpr bool operator>=(const int64N &) const
constexpr int64N & operator>>=(unsigned)
constexpr int64N & operator+=(const int64_t)
constexpr bool operator>(int) const
constexpr bool operator<=(const int64N &) const
constexpr int64N(const int64N< N2 > &)
Create from int128.
constexpr int64N(uint64_t)
Create from int64.
constexpr int64N operator!() const
Overload arimetic operators.
constexpr int64N(const char *)
Create from string.
constexpr int64N< N > & operator=(int64N< N > &&)=default
Move operator.
std::string decimal() const
Get the hexadecimal number as a char array.
constexpr bool operator!=(int) const
constexpr bool operator!=(const int64N &) const
constexpr bool operator>(const int64N &) const
double log2() const
Calculate the log base 2.
static constexpr AMP::extended::int64N< N > min() noexcept
static constexpr AMP::extended::int64N< N > signaling_NaN() noexcept
static constexpr AMP::extended::int64N< N > quiet_NaN() noexcept
static constexpr AMP::extended::int64N< N > denorm_min() noexcept
static constexpr AMP::extended::int64N< N > max() noexcept
static constexpr AMP::extended::int64N< N > round_error() noexcept
static constexpr AMP::extended::int64N< N > infinity() noexcept
static constexpr AMP::extended::int64N< N > lowest() noexcept
static constexpr AMP::extended::int64N< N > epsilon() noexcept
#define DISABLE_WARNINGS
Re-enable warnings.
#define ENABLE_WARNINGS
Suppress all warnings.
constexpr int64N< N > operator*(const int64N< N > &x, const int64N< N > &y)
constexpr int64N< N > operator+(const int64N< N > &x, const int64N< N > &y)
constexpr int64N< N > operator-(const int64N< N > &x, const int64N< N > &y)
constexpr int64N< N > operator/(const int64N< N > &x, const int64N< N > &y)
constexpr int64N< N > operator>>(const int64N< N > &, const int)
std::ostream & operator<<(std::ostream &out, const int64N< N > &x)