#include "lisp.h"
#include "sysproc.h" /* For qxe_getpid */
-#include "ent-gmp.h"
+#include "ent.h"
static mpf_t float_print_min, float_print_max;
gmp_randstate_t random_state;
}
static const struct lrecord_description bigz_description[] = {
- { XD_OPAQUE_DATA_PTR, offsetof(Lisp_Bigz, data) },
+ { XD_OPAQUE_DATA_PTR, offsetof(Lisp_Bigz, data) },
{ XD_END }
};
static const struct lrecord_description bigq_description[] = {
{ XD_OPAQUE_DATA_PTR, offsetof (Lisp_Bigq, data) },
- { XD_END }
+ { XD_END }
};
DEFINE_BASIC_LRECORD_IMPLEMENTATION("bigq", bigq,
str[expt] = '\0';
len = expt + 1;
}
-#if 0
- /* never want this here */
- /* Computerized scientific notation */
- /* We need room for a radix point, format identifier, and exponent */
- const int space = (expt < 0)
- ? (int)(log(-expt) / log(base)) + 3
- : (int)(log(expt) / log(base)) + 2;
- xrealloc_array(str, Bufbyte, len + space);
- memmove(&str[neg + 2], &str[neg + 1], len - neg);
- str[len + 1] = 'l';
- sprintf ((char *)&str[len + 2], "%ld", expt);
-}
-#endif
return str;
}
bigz bz;
bigz_init(bz);
-
+
/* MPZ bigz_set_string has no effect
* with initial + sign */
if (*cp == '+') {
- If p has a '+' sign after the '/' (e.g., 300/+400), it sets the
numerator from the string, but *leaves the denominator unchanged*.
- If p has trailing nonnumeric characters, it sets the numerator from
- the string, but leaves the denominator unchanged.
+ the string, but leaves the denominator unchanged.
- If p has more than one '/', (e.g., 1/2/3), then it sets the
- numerator from the string, but leaves the denominator unchanged.
+ numerator from the string, but leaves the denominator unchanged.
Therefore, move p past any leading '+' signs, temporarily drop a null
after the numeric characters we are trying to convert, and then put