#include <math.h>
#include <string.h>
#include <cfloat>
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/port_def.inc>
#include <google/protobuf/port_undef.inc>
Go to the source code of this file.
◆ DECL_FP_LIMIT_FUNCS
#define DECL_FP_LIMIT_FUNCS |
◆ DECL_FP_LIMITS
#define DECL_FP_LIMITS |
( |
|
FP_Type, |
|
|
|
PREFIX |
|
) |
| |
Value: template <> \
struct PROTOBUF_EXPORT MathLimits<FP_Type> { \
typedef FP_Type UnsignedType; \
static const bool kIsSigned = true; \
static const bool kIsInteger = false; \
static
const Type kPosMin; \
static
const Type kPosMax; \
static
const Type kMin; \
static
const Type kMax; \
static
const Type kNegMin; \
static
const Type kNegMax; \
static
const int kMin10Exp =
PREFIX##_MIN_10_EXP; \
static
const int kMax10Exp =
PREFIX##_MAX_10_EXP; \
static
const Type kEpsilon; \
static
const Type kStdError; \
static
const int kPrecisionDigits =
PREFIX##_DIG; \
static
const Type kNaN; \
static
const Type kPosInf; \
static
const Type kNegInf; \
DECL_FP_LIMIT_FUNCS \
};
Definition at line 268 of file mathlimits.h.
◆ DECL_INT_LIMIT_FUNCS
#define DECL_INT_LIMIT_FUNCS |
Value:
static
bool IsNaN(
const Type ) {
return false; } \
static
bool IsInf(
const Type ) {
return false; } \
Definition at line 171 of file mathlimits.h.
◆ DECL_SIGNED_INT_LIMITS
#define DECL_SIGNED_INT_LIMITS |
( |
|
IntType, |
|
|
|
UnsignedIntType |
|
) |
| |
Value: template <> \
struct PROTOBUF_EXPORT MathLimits<IntType> { \
typedef UnsignedIntType UnsignedType; \
static const bool kIsSigned = true; \
static const bool kIsInteger = true; \
static
const Type kPosMin = 1; \
static
const Type kMax = kPosMax; \
static
const Type kNegMin = -1; \
static
const Type kNegMax = kMin; \
static const int kMin10Exp = 0; \
static
const Type kEpsilon = 1; \
static
const Type kStdError = 0; \
DECL_INT_LIMIT_FUNCS \
};
Definition at line 178 of file mathlimits.h.
◆ DECL_UNSIGNED_INT_LIMITS
#define DECL_UNSIGNED_INT_LIMITS |
( |
|
IntType | ) |
|
Value: template <> \
struct PROTOBUF_EXPORT MathLimits<IntType> { \
typedef IntType UnsignedType; \
static const bool kIsSigned = false; \
static const bool kIsInteger = true; \
static
const Type kPosMin = 1; \
static
const Type kMin = 0; \
static
const Type kMax = kPosMax; \
static const int kMin10Exp = 0; \
static
const Type kEpsilon = 1; \
static
const Type kStdError = 0; \
DECL_INT_LIMIT_FUNCS \
};
Definition at line 198 of file mathlimits.h.
◆ ISINF
◆ ISNAN
◆ SIGNED_INT_MAX
#define SIGNED_INT_MAX |
( |
|
Type | ) |
(((Type(1) << (sizeof(Type)*8 - 2)) - 1) + (Type(1) << (sizeof(Type)*8 - 2))) |
◆ SIGNED_INT_MIN
#define SIGNED_INT_MIN |
( |
|
Type | ) |
(-(Type(1) << (sizeof(Type)*8 - 2)) - (Type(1) << (sizeof(Type)*8 - 2))) |
◆ SIGNED_MAX_10_EXP
#define SIGNED_MAX_10_EXP |
( |
|
Type | ) |
|
Value: (
sizeof(
Type) == 1 ? 2 : ( \
sizeof(
Type) == 2 ? 4 : ( \
sizeof(
Type) == 4 ? 9 : ( \
sizeof(
Type) == 8 ? 18 : -1))))
Definition at line 159 of file mathlimits.h.
◆ UNSIGNED_INT_MAX
#define UNSIGNED_INT_MAX |
( |
|
Type | ) |
(((Type(1) << (sizeof(Type)*8 - 1)) - 1) + (Type(1) << (sizeof(Type)*8 - 1))) |
◆ UNSIGNED_MAX_10_EXP
#define UNSIGNED_MAX_10_EXP |
( |
|
Type | ) |
|
Value: (
sizeof(
Type) == 1 ? 2 : ( \
sizeof(
Type) == 2 ? 4 : ( \
sizeof(
Type) == 4 ? 9 : ( \
sizeof(
Type) == 8 ? 19 : -1))))
Definition at line 165 of file mathlimits.h.