23#define FPLLL_WITH_LONG_DOUBLE
27#define FPLLL_WITH_ZDOUBLE
28#define FPLLL_WITH_ZLONG
29#define FPLLL_WITH_GETRUSAGE
46#ifdef FPLLL_WITH_GETRUSAGE
47#include <sys/resource.h>
64#if defined(__sun) || defined(__CYGWIN__)
66extern "C" long double ldexpl(
long double x,
int exp);
68#define NAN __builtin_nanf("")
72#define FPLLL_INFO(x) \
76#define FPLLL_ABORT(x) \
78 cerr << "fplll: " << x << endl; \
81#define FPLLL_CHECK(x, y) \
89extern int debug_depth;
90#define FPLLL_TRACE(x) std::cerr << "TRACE: " << std::string(debug_depth * 2, ' ') << x << std::endl
93 DebugTracer(
const char *f) : f(f) { debug_depth++; }
101#define FPLLL_DEBUG_ABORT(x) FPLLL_ABORT(x)
102#define FPLLL_DEBUG_CHECK(x) assert(x);
103#define FPLLL_TRACE_IN(x) \
104 FPLLL_TRACE("<" << __func__ << " " << x << ">"); \
105 DebugTracer debugTracer(__func__);
106#define FPLLL_DEBUG_SAFEVECT
108#define FPLLL_DEBUG_ABORT(x)
109#define FPLLL_DEBUG_CHECK(x)
110#define FPLLL_TRACE(x)
111#define FPLLL_TRACE_IN(x)
114#define FPLLL_BEGIN_NAMESPACE \
117#define FPLLL_END_NAMESPACE }
126#if (LONG_MAX == 2147483647L)
174 "infinite number in GSO",
175 "infinite loop in babai",
176 "infinite loop in LLL",
177 "error in SVP solver",
179 "time limit exceeded in BKZ",
180 "loops limit exceeded in BKZ",
182 "increase of the norm",
183 "error in weak size reduction",
184 "Please see https://github.com/fplll/fplll/wiki/fplll-errors-FAQ for more information."};
220const char *
const FLOAT_TYPE_STR[7] = {
"",
"double",
"long double",
"dpe",
"dd",
"qd",
"mpfr"};
283#ifndef FPLLL_DEFAULT_STRATEGY_PATH
284#define FPLLL_DEFAULT_STRATEGY_PATH ""
287#ifndef FPLLL_DEFAULT_STRATEGY
288#define FPLLL_DEFAULT_STRATEGY ""
315#define PRUNER_ZEALOUS (PRUNER_GRADIENT | PRUNER_NELDER_MEAD)
const int MAX_EXP_DOUBLE
Definition: defs.h:138
const char *const FLOAT_TYPE_STR[7]
Definition: defs.h:220
const double LLL_DEF_DELTA
Definition: defs.h:143
CVPFlags
Definition: defs.h:251
@ CVP_DEFAULT
Definition: defs.h:252
@ CVP_VERBOSE
Definition: defs.h:253
const char *const LLL_METHOD_STR[6]
Definition: defs.h:194
const char *const RED_STATUS_STR[RED_STATUS_MAX]
Definition: defs.h:171
CVPMethod
Definition: defs.h:237
@ CVPM_FAST
Definition: defs.h:238
@ CVPM_PROVED
Definition: defs.h:239
const int BKZ_DEF_RERANDOMIZATION_DENSITY
Definition: defs.h:260
#define FPLLL_TRACE(x)
Definition: defs.h:110
BKZFlags
Definition: defs.h:263
@ BKZ_VERBOSE
Definition: defs.h:265
@ BKZ_SD_VARIANT
Definition: defs.h:273
@ BKZ_SLD_RED
Definition: defs.h:274
@ BKZ_GH_BND
Definition: defs.h:272
@ BKZ_NO_LLL
Definition: defs.h:266
@ BKZ_DEFAULT
Definition: defs.h:264
@ BKZ_MAX_LOOPS
Definition: defs.h:267
@ BKZ_BOUNDED_LLL
Definition: defs.h:269
@ BKZ_MAX_TIME
Definition: defs.h:268
@ BKZ_DUMP_GSO
Definition: defs.h:271
@ BKZ_AUTO_ABORT
Definition: defs.h:270
const double LLL_DEF_ETA
Definition: defs.h:144
const double MAX_LONG_FAST
Definition: defs.h:134
RedStatus
Definition: defs.h:154
@ RED_BKZ_TIME_LIMIT
Definition: defs.h:162
@ RED_GSO_FAILURE
Definition: defs.h:157
@ RED_LLL_FAILURE
Definition: defs.h:159
@ RED_BABAI_FAILURE
Definition: defs.h:158
@ RED_BKZ_FAILURE
Definition: defs.h:161
@ RED_URL_ERR
Definition: defs.h:167
@ RED_ENUM_FAILURE
Definition: defs.h:160
@ RED_HLLL_FAILURE
Definition: defs.h:164
@ RED_BKZ_LOOPS_LIMIT
Definition: defs.h:163
@ RED_SUCCESS
Definition: defs.h:155
@ RED_HLLL_NORM_FAILURE
Definition: defs.h:165
@ RED_HLLL_SR_FAILURE
Definition: defs.h:166
@ RED_STATUS_MAX
Definition: defs.h:168
const int CPU_SIZE
Definition: defs.h:132
LLLMethod
Definition: defs.h:187
@ LM_FAST
Definition: defs.h:191
@ LM_PROVED
Definition: defs.h:189
@ LM_HEURISTIC
Definition: defs.h:190
@ LM_WRAPPER
Definition: defs.h:188
#define FPLLL_END_NAMESPACE
Definition: defs.h:117
const char *const HLLL_METHOD_STR[4]
Definition: defs.h:198
const int PREC_QD
Definition: defs.h:141
const int PREC_DOUBLE
Definition: defs.h:139
const double LLL_DEF_EPSILON
Definition: defs.h:145
SVPMethod
Definition: defs.h:231
@ SVPM_FAST
Definition: defs.h:232
@ SVPM_PROVED
Definition: defs.h:233
const double HLLL_DEF_C
Definition: defs.h:151
const int PREC_DD
Definition: defs.h:140
FloatType
Definition: defs.h:210
@ FT_QD
Definition: defs.h:216
@ FT_DPE
Definition: defs.h:214
@ FT_MPFR
Definition: defs.h:217
@ FT_DD
Definition: defs.h:215
@ FT_DOUBLE
Definition: defs.h:212
@ FT_LONG_DOUBLE
Definition: defs.h:213
@ FT_DEFAULT
Definition: defs.h:211
const int SIZE_RED_FAILURE_THRESH
Definition: defs.h:146
HKZFlags
Definition: defs.h:278
@ HKZ_DEFAULT
Definition: defs.h:279
@ HKZ_VERBOSE
Definition: defs.h:280
const double BKZ_DEF_GH_FACTOR
Definition: defs.h:258
IntType
Definition: defs.h:201
@ ZT_DOUBLE
Definition: defs.h:204
@ ZT_MPZ
Definition: defs.h:202
@ ZT_LONG
Definition: defs.h:203
const double HLLL_DEF_THETA
Definition: defs.h:149
const double BKZ_DEF_AUTO_ABORT_SCALE
Definition: defs.h:256
const int BKZ_DEF_AUTO_ABORT_MAX_NO_DEC
Definition: defs.h:257
SVPFlags
Definition: defs.h:243
@ SVP_VERBOSE
Definition: defs.h:245
@ SVP_DEFAULT
Definition: defs.h:244
@ SVP_DUAL
Definition: defs.h:247
@ SVP_OVERRIDE_BND
Definition: defs.h:246
PrunerMetric
Definition: defs.h:292
@ PRUNER_METRIC_PROBABILITY_OF_SHORTEST
Definition: defs.h:293
@ PRUNER_METRIC_EXPECTED_SOLUTIONS
Definition: defs.h:294
const double BKZ_DEF_MIN_SUCCESS_PROBABILITY
Definition: defs.h:259
#define FPLLL_BEGIN_NAMESPACE
Definition: defs.h:114
PrunerFlags
Definition: defs.h:298
@ PRUNER_SINGLE
Definition: defs.h:312
@ PRUNER_START_FROM_INPUT
Definition: defs.h:302
@ PRUNER_VERBOSE
Definition: defs.h:306
@ PRUNER_NELDER_MEAD
Definition: defs.h:304
@ PRUNER_GRADIENT
Definition: defs.h:303
@ PRUNER_CVP
Definition: defs.h:299
@ PRUNER_HALF
Definition: defs.h:309
const char *const INT_TYPE_STR[5]
Definition: defs.h:207
const long int EXPO_MAX
Definition: defs.h:135
const int CPU_SIZE_1
Definition: defs.h:133
LLLFlags
Definition: defs.h:223
@ LLL_VERBOSE
Definition: defs.h:224
@ LLL_DEFAULT
Definition: defs.h:227
@ LLL_EARLY_RED
Definition: defs.h:225
@ LLL_SIEGEL
Definition: defs.h:226
FP_NR< F > exp(const FP_NR< F > &a)
Definition: nr_FP.inl:572