|
@ -7,6 +7,7 @@ |
|
|
#include <math.h> |
|
|
#include <math.h> |
|
|
#include <stdbool.h> |
|
|
#include <stdbool.h> |
|
|
#include <limits.h> |
|
|
#include <limits.h> |
|
|
|
|
|
#include <float.h> |
|
|
|
|
|
|
|
|
#define LD(name)\ |
|
|
#define LD(name)\ |
|
|
long double name##ldvalue;\ |
|
|
long double name##ldvalue;\ |
|
@ -209,3 +210,11 @@ unsigned long long getull(char *message, unsigned long long *min, unsigned long |
|
|
LD(max) |
|
|
LD(max) |
|
|
return getNumber(message, minld, maxld, NULL, NULL, 0, ULLONG_MAX); |
|
|
return getNumber(message, minld, maxld, NULL, NULL, 0, ULLONG_MAX); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
double getlf(char *message, double *min, double *max, double *greaterThan, double *smallerThan) { |
|
|
|
|
|
LD(min) |
|
|
|
|
|
LD(max) |
|
|
|
|
|
LD(greaterThan) |
|
|
|
|
|
LD(smallerThan) |
|
|
|
|
|
return getNumber(message, minld, maxld, greaterThanld, smallerThanld, -DBL_MAX, DBL_MAX); |
|
|
|
|
|
} |