#include <stdio.h>
#include <math.h>
#include "libguile/_scm.h"
-#include "libguile/unif.h"
#include "libguile/feature.h"
#include "libguile/ports.h"
#include "libguile/root.h"
#define SCM_SWAP(x,y) do { SCM __t = x; x = y; y = __t; } while (0)
+#if (SCM_DEBUG_DEPRECATED == 1) /* not defined in header yet? */
+
+/* SCM_FLOBUFLEN is the maximum number of characters neccessary for the
+ * printed or scm_string representation of an inexact number.
+ */
+#define SCM_FLOBUFLEN (10+2*(sizeof(double)/sizeof(char)*SCM_CHAR_BIT*3+9)/10)
+
+#endif /* SCM_DEBUG_DEPRECATED == 1 */
+
+
/* IS_INF tests its floating point number for infiniteness
+ Dirk:FIXME:: This test does not work if x == 0
*/
#ifndef IS_INF
-#define IS_INF(x) ((x) == (x) + 1)
+#define IS_INF(x) ((x) == (x) / 2)
#endif
+
/* Return true if X is not infinite and is not a NaN
+ Dirk:FIXME:: Since IS_INF is broken, this test does not work if x == 0
*/
#ifndef isfinite
#define isfinite(x) (!IS_INF (x) && (x) == (x))
} else {
return scm_copybig (x, 0);
}
+ } else if (SCM_REALP (x)) {
+ return scm_make_real (fabs (SCM_REAL_VALUE (x)));
} else {
SCM_WTA_DISPATCH_1 (g_abs, x, 1, s_abs);
}
if (yy == 0) {
scm_num_overflow (s_remainder);
} else {
-#if (__TURBOC__ == 1)
- long z = SCM_INUM (x) % (yy < 0 ? -yy : yy);
-#else
long z = SCM_INUM (x) % yy;
-#endif
return SCM_MAKINUM (z);
}
} else if (SCM_BIGP (y)) {
if (yy == 0) {
scm_num_overflow (s_modulo);
} else {
-#if (__TURBOC__ == 1)
- long z = ((yy < 0) ? -xx : xx) % yy;
-#else
long z = xx % yy;
-#endif
return SCM_MAKINUM (((yy < 0) ? (z > 0) : (z < 0)) ? z + yy : z);
}
} else if (SCM_BIGP (y)) {
"@end example")
#define FUNC_NAME s_scm_logbit_p
{
- SCM_ASSERT(SCM_INUMP(index) && SCM_INUM(index) >= 0, index, SCM_ARG1, FUNC_NAME);
-#ifdef SCM_BIGDIG
- if SCM_NINUMP(j) {
- SCM_ASSERT(SCM_BIGP (j), j, SCM_ARG2, FUNC_NAME);
- if (SCM_NUMDIGS(j) * SCM_BITSPERDIG < SCM_INUM(index)) return SCM_BOOL_F;
- else if SCM_BIGSIGN(j) {
+ unsigned long int iindex;
+
+ SCM_VALIDATE_INUM_MIN (SCM_ARG1, index, 0);
+ iindex = (unsigned long int) SCM_INUM (index);
+
+ if (SCM_INUMP (j)) {
+ return SCM_BOOL ((1L << iindex) & SCM_INUM (j));
+ } else if (SCM_BIGP (j)) {
+ if (SCM_NUMDIGS (j) * SCM_BITSPERDIG < iindex) {
+ return SCM_BOOL_F;
+ } else if (SCM_BIGSIGN (j)) {
long num = -1;
scm_sizet i = 0;
- SCM_BIGDIG *x = SCM_BDIGITS(j);
- scm_sizet nx = SCM_INUM(index)/SCM_BITSPERDIG;
- while (!0) {
+ SCM_BIGDIG * x = SCM_BDIGITS (j);
+ scm_sizet nx = iindex / SCM_BITSPERDIG;
+ while (1) {
num += x[i];
- if (nx==i++)
- return ((1L << (SCM_INUM(index)%SCM_BITSPERDIG)) & num) ? SCM_BOOL_F : SCM_BOOL_T;
- if (num < 0) num = -1;
- else num = 0;
+ if (nx == i++) {
+ return SCM_BOOL (((1L << (iindex % SCM_BITSPERDIG)) & num) == 0);
+ } else if (num < 0) {
+ num = -1;
+ } else {
+ num = 0;
+ }
}
+ } else {
+ return SCM_BOOL (SCM_BDIGITS (j) [iindex / SCM_BITSPERDIG]
+ & (1L << (iindex % SCM_BITSPERDIG)));
}
- else return (SCM_BDIGITS(j)[SCM_INUM(index)/SCM_BITSPERDIG] &
- (1L << (SCM_INUM(index)%SCM_BITSPERDIG))) ? SCM_BOOL_T : SCM_BOOL_F;
+ } else {
+ SCM_WRONG_TYPE_ARG (SCM_ARG2, j);
}
-#else
- SCM_ASSERT(SCM_INUMP(j), j, SCM_ARG2, FUNC_NAME);
-#endif
- return ((1L << SCM_INUM(index)) & SCM_INUM(j)) ? SCM_BOOL_T : SCM_BOOL_F;
}
#undef FUNC_NAME
+
SCM_DEFINE (scm_lognot, "lognot", 1, 0, 0,
(SCM n),
"Returns the integer which is the 2s-complement of the integer argument.\n\n"
}
#undef FUNC_NAME
-/* GJB:FIXME: do not use SCMs as integers! */
+
SCM_DEFINE (scm_bit_extract, "bit-extract", 3, 0, 0,
(SCM n, SCM start, SCM end),
"Returns the integer composed of the @var{start} (inclusive) through\n"
#define FUNC_NAME s_scm_bit_extract
{
int istart, iend;
- SCM_VALIDATE_INUM (1,n);
SCM_VALIDATE_INUM_MIN_COPY (2,start,0,istart);
SCM_VALIDATE_INUM_MIN_COPY (3, end, 0, iend);
SCM_ASSERT_RANGE (3, end, (iend >= istart));
-#ifdef SCM_BIGDIG
- if (SCM_NINUMP (n))
- return
- scm_logand (scm_difference (scm_integer_expt (SCM_MAKINUM (2),
- SCM_MAKINUM (iend - istart)),
- SCM_MAKINUM (1L)),
- scm_ash (n, SCM_MAKINUM (-istart)));
-#else
- SCM_VALIDATE_INUM (1,n);
-#endif
- return SCM_MAKINUM ((SCM_INUM (n) >> istart) & ((1L << (iend - istart)) - 1));
+
+ if (SCM_INUMP (n)) {
+ return SCM_MAKINUM ((SCM_INUM (n) >> istart) & ((1L << (iend - istart)) - 1));
+ } else if (SCM_BIGP (n)) {
+ SCM num1 = SCM_MAKINUM (1L);
+ SCM num2 = SCM_MAKINUM (2L);
+ SCM bits = SCM_MAKINUM (iend - istart);
+ SCM mask = scm_difference (scm_integer_expt (num2, bits), num1);
+ return scm_logand (mask, scm_ash (n, SCM_MAKINUM (-istart)));
+ } else {
+ SCM_WRONG_TYPE_ARG (SCM_ARG1, n);
+ }
}
#undef FUNC_NAME
+
static const char scm_logtab[] = {
0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4
};
"@end lisp")
#define FUNC_NAME s_scm_logcount
{
- register unsigned long c = 0;
- register long nn;
-#ifdef SCM_BIGDIG
- if (SCM_NINUMP (n))
- {
- scm_sizet i;
- SCM_BIGDIG *ds, d;
- SCM_VALIDATE_BIGINT (1,n);
- if (SCM_BIGSIGN (n))
- return scm_logcount (scm_difference (SCM_MAKINUM (-1L), n));
- ds = SCM_BDIGITS (n);
- for (i = SCM_NUMDIGS (n); i--;)
- for (d = ds[i]; d; d >>= 4)
+ if (SCM_INUMP (n)) {
+ unsigned long int c = 0;
+ long int nn = SCM_INUM (n);
+ if (nn < 0) {
+ nn = -1 - nn;
+ };
+ while (nn) {
+ c += scm_logtab[15 & nn];
+ nn >>= 4;
+ };
+ return SCM_MAKINUM (c);
+ } else if (SCM_BIGP (n)) {
+ if (SCM_BIGSIGN (n)) {
+ return scm_logcount (scm_difference (SCM_MAKINUM (-1L), n));
+ } else {
+ unsigned long int c = 0;
+ scm_sizet i = SCM_NUMDIGS (n);
+ SCM_BIGDIG * ds = SCM_BDIGITS (n);
+ while (i--) {
+ SCM_BIGDIG d;
+ for (d = ds[i]; d; d >>= 4) {
c += scm_logtab[15 & d];
+ }
+ }
return SCM_MAKINUM (c);
}
-#else
- SCM_VALIDATE_INUM (1,n);
-#endif
- if ((nn = SCM_INUM (n)) < 0)
- nn = -1 - nn;
- for (; nn; nn >>= 4)
- c += scm_logtab[15 & nn];
- return SCM_MAKINUM (c);
+ } else {
+ SCM_WRONG_TYPE_ARG (SCM_ARG1, n);
+ }
}
#undef FUNC_NAME
"@end lisp")
#define FUNC_NAME s_scm_integer_length
{
- register unsigned long c = 0;
- register long nn;
- unsigned int l = 4;
-#ifdef SCM_BIGDIG
- if (SCM_NINUMP (n))
- {
- SCM_BIGDIG *ds, d;
- SCM_VALIDATE_BIGINT (1,n);
- if (SCM_BIGSIGN (n))
- return scm_integer_length (scm_difference (SCM_MAKINUM (-1L), n));
- ds = SCM_BDIGITS (n);
- d = ds[c = SCM_NUMDIGS (n) - 1];
- for (c *= SCM_BITSPERDIG; d; d >>= 4)
- {
- c += 4;
- l = scm_ilentab[15 & d];
- }
- return SCM_MAKINUM (c - 4 + l);
- }
-#else
- SCM_VALIDATE_INUM (1,n);
-#endif
- if ((nn = SCM_INUM (n)) < 0)
- nn = -1 - nn;
- for (; nn; nn >>= 4)
- {
+ if (SCM_INUMP (n)) {
+ unsigned long int c = 0;
+ unsigned int l = 4;
+ long int nn = SCM_INUM (n);
+ if (nn < 0) {
+ nn = -1 - nn;
+ };
+ while (nn) {
c += 4;
- l = scm_ilentab[15 & nn];
+ l = scm_ilentab [15 & nn];
+ nn >>= 4;
+ };
+ return SCM_MAKINUM (c - 4 + l);
+ } else if (SCM_BIGP (n)) {
+ if (SCM_BIGSIGN (n)) {
+ return scm_integer_length (scm_difference (SCM_MAKINUM (-1L), n));
+ } else {
+ unsigned long int digs = SCM_NUMDIGS (n) - 1;
+ unsigned long int c = digs * SCM_BITSPERDIG;
+ unsigned int l = 4;
+ SCM_BIGDIG * ds = SCM_BDIGITS (n);
+ SCM_BIGDIG d = ds [digs];
+ while (d) {
+ c += 4;
+ l = scm_ilentab [15 & d];
+ d >>= 4;
+ };
+ return SCM_MAKINUM (c - 4 + l);
}
- return SCM_MAKINUM (c - 4 + l);
+ } else {
+ SCM_WRONG_TYPE_ARG (SCM_ARG1, n);
+ }
}
#undef FUNC_NAME
/* Cast to long int to avoid signed/unsigned comparison warnings. */
if ((( ((long int) nlen) << SCM_BIGSIZEFIELD) >> SCM_BIGSIZEFIELD)
!= (long int) nlen)
- scm_wta (SCM_MAKINUM (nlen), (char *) SCM_NALLOC, s_bignum);
+ scm_memory_error (s_bignum);
SCM_NEWCELL (v);
SCM_DEFER_INTS;
if (SCM_POSFIXABLE (num))
return SCM_MAKINUM (num);
}
- else if (SCM_UNEGFIXABLE (num))
+ else if (num <= -SCM_MOST_NEGATIVE_FIXNUM)
return SCM_MAKINUM (-num);
return b;
}
{
scm_sizet nsiz = nlen;
if (((nsiz << SCM_BIGSIZEFIELD) >> SCM_BIGSIZEFIELD) != nlen)
- scm_wta (scm_ulong2num (nsiz), (char *) SCM_NALLOC, s_adjbig);
+ scm_memory_error (s_adjbig);
SCM_DEFER_INTS;
{
}
return ans;
}
-#endif
+#endif /* HAVE_LONG_LONGS */
SCM
}
-/* Sun's compiler complains about the fact that this function has an
- ANSI prototype in numbers.h, but a K&R declaration here, and the
- two specify different promotions for the third argument. I'm going
- to turn this into an ANSI declaration, and see if anyone complains
- about it not being K&R. */
-
unsigned int
-scm_divbigdig (SCM_BIGDIG * ds,
- scm_sizet h,
- SCM_BIGDIG div)
+scm_divbigdig (SCM_BIGDIG * ds, scm_sizet h, SCM_BIGDIG div)
{
register unsigned long t2 = 0;
while (h--)
SCM_DEFINE (scm_number_to_string, "number->string", 1, 1, 0,
- (SCM x, SCM radix),
- "")
+ (SCM n, SCM radix),
+ "Return a string holding the external representation of the\n"
+ "number N in the given RADIX. If N is inexact, a radix of 10\n"
+ "will be used.")
#define FUNC_NAME s_scm_number_to_string
{
int base;
SCM_ASSERT_RANGE (2, radix, base >= 2);
}
- if (SCM_INUMP (x)) {
+ if (SCM_INUMP (n)) {
char num_buf [SCM_INTBUFLEN];
- scm_sizet length = scm_iint2str (SCM_INUM (x), base, num_buf);
+ scm_sizet length = scm_iint2str (SCM_INUM (n), base, num_buf);
return scm_makfromstr (num_buf, length, 0);
- } else if (SCM_BIGP (x)) {
- return big2str (x, (unsigned int) base);
- } else if (SCM_INEXACTP (x)) {
+ } else if (SCM_BIGP (n)) {
+ return big2str (n, (unsigned int) base);
+ } else if (SCM_INEXACTP (n)) {
char num_buf [SCM_FLOBUFLEN];
- return scm_makfromstr (num_buf, iflo2str (x, num_buf), 0);
+ return scm_makfromstr (num_buf, iflo2str (n, num_buf), 0);
} else {
- SCM_WRONG_TYPE_ARG (1, x);
+ SCM_WRONG_TYPE_ARG (1, n);
}
}
#undef FUNC_NAME
return SCM_BOOL_F; /* not `real' */
if (SCM_SLOPPY_COMPLEXP (second))
return SCM_BOOL_F; /* not `real' */
- tmp = SCM_REALPART (second);
+ tmp = SCM_REAL_VALUE (second);
return scm_make_complex (res * cos (tmp), res * sin (tmp));
}
default:
return SCM_BOOL_F; /* not `ureal' */
if (SCM_SLOPPY_COMPLEXP (second))
return SCM_BOOL_F; /* not `ureal' */
- tmp = SCM_REALPART (second);
+ tmp = SCM_REAL_VALUE (second);
if (tmp < 0.0)
return SCM_BOOL_F; /* not `ureal' */
return scm_make_complex (res, (lead_sgn * tmp));
SCM_DEFINE (scm_string_to_number, "string->number", 1, 1, 0,
- (SCM str, SCM radix),
- "")
+ (SCM string, SCM radix),
+ "Returns a number of the maximally precise representation\n"
+ "expressed by the given STRING. RADIX must be an exact integer,\n"
+ "either 2, 8, 10, or 16. If supplied, RADIX is a default radix\n"
+ "that may be overridden by an explicit radix prefix in STRING\n"
+ "(e.g. \"#o177\"). If RADIX is not supplied, then the default\n"
+ "radix is 10. If string is not a syntactically valid notation\n"
+ "for a number, then `string->number' returns #f. (r5rs)")
#define FUNC_NAME s_scm_string_to_number
{
SCM answer;
int base;
- SCM_VALIDATE_ROSTRING (1,str);
+ SCM_VALIDATE_ROSTRING (1,string);
SCM_VALIDATE_INUM_MIN_DEF_COPY (2,radix,2,10,base);
- answer = scm_istring2number (SCM_ROCHARS (str),
- SCM_ROLENGTH (str),
+ answer = scm_istring2number (SCM_ROCHARS (string),
+ SCM_ROLENGTH (string),
base);
- return scm_return_first (answer, str);
+ return scm_return_first (answer, string);
}
#undef FUNC_NAME
/*** END strs->nums ***/
+
SCM
scm_make_real (double x)
{
SCM z;
- SCM_NEWREAL (z, x);
+ SCM_NEWCELL2 (z);
+ SCM_SET_CELL_TYPE (z, scm_tc16_real);
+ SCM_REAL_VALUE (z) = x;
return z;
}
+
SCM
scm_make_complex (double x, double y)
{
- SCM z;
- SCM_NEWCOMPLEX (z, x, y);
- return z;
+ if (y == 0.0) {
+ return scm_make_real (x);
+ } else {
+ SCM z;
+ SCM_NEWSMOB (z, scm_tc16_complex, scm_must_malloc (2L * sizeof (double), "complex"));
+ SCM_COMPLEX_REAL (z) = x;
+ SCM_COMPLEX_IMAG (z) = y;
+ return z;
+ }
}
+
SCM
scm_bigequal (SCM x, SCM y)
{
SCM_DEFINE (scm_number_p, "complex?", 1, 0, 0,
(SCM x),
- "")
+ "Return #t if X is a complex number, #f else. Note that the\n"
+ "sets of real, rational and integer values form subsets of the\n"
+ "set of complex numbers, i. e. the predicate will also be\n"
+ "fulfilled if X is a real, rational or integer number.")
#define FUNC_NAME s_scm_number_p
{
- if (SCM_INUMP (x))
- return SCM_BOOL_T;
- if (SCM_NUMP (x))
- return SCM_BOOL_T;
- return SCM_BOOL_F;
+ return SCM_BOOL (SCM_NUMBERP (x));
}
#undef FUNC_NAME
-
SCM_REGISTER_PROC (s_real_p, "real?", 1, 0, 0, scm_real_p);
-
SCM_DEFINE (scm_real_p, "rational?", 1, 0, 0,
(SCM x),
- "")
+ "Return #t if X is a rational number, #f else. Note that the\n"
+ "set of integer values forms a subset of the set of rational\n"
+ "numbers, i. e. the predicate will also be fulfilled if X is an\n"
+ "integer number.")
#define FUNC_NAME s_scm_real_p
{
- if (SCM_INUMP (x))
+ if (SCM_INUMP (x)) {
return SCM_BOOL_T;
- if (SCM_IMP (x))
+ } else if (SCM_IMP (x)) {
return SCM_BOOL_F;
- if (SCM_SLOPPY_REALP (x))
+ } else if (SCM_SLOPPY_REALP (x)) {
return SCM_BOOL_T;
-#ifdef SCM_BIGDIG
- if (SCM_BIGP (x))
+ } else if (SCM_BIGP (x)) {
return SCM_BOOL_T;
-#endif
- return SCM_BOOL_F;
+ } else {
+ return SCM_BOOL_F;
+ }
}
#undef FUNC_NAME
-
SCM_DEFINE (scm_integer_p, "integer?", 1, 0, 0,
(SCM x),
- "")
+ "Return #t if X is an integer number, #f else.")
#define FUNC_NAME s_scm_integer_p
{
double r;
return SCM_BOOL_T;
if (SCM_IMP (x))
return SCM_BOOL_F;
-#ifdef SCM_BIGDIG
if (SCM_BIGP (x))
return SCM_BOOL_T;
-#endif
if (!SCM_SLOPPY_INEXACTP (x))
return SCM_BOOL_F;
if (SCM_SLOPPY_COMPLEXP (x))
return SCM_BOOL_F;
- r = SCM_REALPART (x);
+ r = SCM_REAL_VALUE (x);
if (r == floor (r))
return SCM_BOOL_T;
return SCM_BOOL_F;
#undef FUNC_NAME
-
SCM_DEFINE (scm_inexact_p, "inexact?", 1, 0, 0,
(SCM x),
- "")
+ "Return #t if X is an inexact number, #f else.")
#define FUNC_NAME s_scm_inexact_p
{
return SCM_BOOL (SCM_INEXACTP (x));
SCM_DEFINE1 (scm_gr_p, ">", scm_tc7_rpsubr,
(SCM x, SCM y),
- "")
+ "Return #t if the list of parameters is monotonically\n"
+ "increasing.")
#define FUNC_NAME s_scm_gr_p
{
return scm_less_p (y, x);
SCM_DEFINE1 (scm_leq_p, "<=", scm_tc7_rpsubr,
(SCM x, SCM y),
- "")
+ "Return #t if the list of parameters is monotonically\n"
+ "non-decreasing.")
#define FUNC_NAME s_scm_leq_p
{
return SCM_BOOL_NOT (scm_less_p (y, x));
SCM_DEFINE1 (scm_geq_p, ">=", scm_tc7_rpsubr,
(SCM x, SCM y),
- "")
+ "Return #t if the list of parameters is monotonically\n"
+ "non-increasing.")
#define FUNC_NAME s_scm_geq_p
{
return SCM_BOOL_NOT (scm_less_p (x, y));
SCM_DEFINE (scm_sys_expt, "$expt", 2, 0, 0,
(SCM z1, SCM z2),
- "")
+ "")
#define FUNC_NAME s_scm_sys_expt
{
struct dpair xy;
#undef FUNC_NAME
-
SCM_DEFINE (scm_sys_atan2, "$atan2", 2, 0, 0,
(SCM z1, SCM z2),
"")
#undef FUNC_NAME
-
SCM_DEFINE (scm_make_rectangular, "make-rectangular", 2, 0, 0,
- (SCM z1, SCM z2),
- "")
+ (SCM real, SCM imaginary),
+ "Return a complex number constructed of the given REAL and\n"
+ "IMAGINARY parts.")
#define FUNC_NAME s_scm_make_rectangular
{
struct dpair xy;
- scm_two_doubles (z1, z2, FUNC_NAME, &xy);
+ scm_two_doubles (real, imaginary, FUNC_NAME, &xy);
return scm_make_complex (xy.x, xy.y);
}
#undef FUNC_NAME
SCM_DEFINE (scm_make_polar, "make-polar", 2, 0, 0,
(SCM z1, SCM z2),
- "")
+ "Return the complex number Z1 * e^(i * Z2).")
#define FUNC_NAME s_scm_make_polar
{
struct dpair xy;
scm_magnitude (SCM z)
{
if (SCM_INUMP (z)) {
- return scm_abs (z);
+ long int zz = SCM_INUM (z);
+ if (zz >= 0) {
+ return z;
+ } else if (SCM_POSFIXABLE (-zz)) {
+ return SCM_MAKINUM (-zz);
+ } else {
+#ifdef SCM_BIGDIG
+ return scm_long2big (-zz);
+#else
+ scm_num_overflow (s_magnitude);
+#endif
+ }
} else if (SCM_BIGP (z)) {
- return scm_abs (z);
+ if (!SCM_BIGSIGN (z)) {
+ return z;
+ } else {
+ return scm_copybig (z, 0);
+ }
} else if (SCM_REALP (z)) {
return scm_make_real (fabs (SCM_REAL_VALUE (z)));
} else if (SCM_COMPLEXP (z)) {
SCM_DEFINE (scm_inexact_to_exact, "inexact->exact", 1, 0, 0,
(SCM z),
- "")
+ "Returns an exact number that is numerically closest to Z.")
#define FUNC_NAME s_scm_inexact_to_exact
{
if (SCM_INUMP (z)) {
}
}
-#endif
+#endif /* HAVE_LONG_LONGS */
SCM
}
}
-#endif
+#endif /* HAVE_LONG_LONGS */
unsigned long
}
-#ifndef DBL_DIG
-static void
-add1 (double f, double *fsum)
-{
- *fsum = f + 1.0;
-}
-#endif
-
-
void
scm_init_numbers ()
{
scm_add_feature ("complex");
scm_add_feature ("inexact");
- SCM_NEWREAL (scm_flo0, 0.0);
+ scm_flo0 = scm_make_real (0.0);
#ifdef DBL_DIG
scm_dblprec = (DBL_DIG > 20) ? 20 : DBL_DIG;
#else
{ /* determine floating point precision */
double f = 0.1;
double fsum = 1.0 + f;
- while (fsum != 1.0)
- {
+ while (fsum != 1.0) {
+ if (++scm_dblprec > 20) {
+ fsum = 1.0;
+ } else {
f /= 10.0;
- if (++scm_dblprec > 20)
- break;
- add1 (f, &fsum);
+ fsum = f + 1.0;
}
+ }
scm_dblprec = scm_dblprec - 1;
}
#endif /* DBL_DIG */