+2000-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
+
+ * numbers.h (SCM_SETNUMDIGS): Use SCM_BIGSIZEFIELD macro for
+ shifting, not constant. Thanks to Dale P. Smith.
+
+ * numbers.c (scm_sum, scm_difference): Don't test a SCM value
+ for being less than zero. Decode it to a C value first. Again,
+ thank you Dale.
+
2000-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
* numbers.h, ramap.c, struct.h, vectors.h: Don't use SCM2PTR for
-/* Copyright (C) 1995,1996,1997,1998, 1999, 2000 Free Software Foundation, Inc.
-
+/* Copyright (C) 1995,1996,1997,1998,1999,2000 Free Software Foundation, Inc.
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
{
intbig:
{
+ long i = SCM_INUM (x);
# ifndef SCM_DIGSTOOBIG
- long z = scm_pseudolong (SCM_INUM (x));
+ long z = scm_pseudolong (i);
return scm_addbig ((SCM_BIGDIG *) & z,
SCM_DIGSPERLONG,
- (x < 0) ? SCM_BIGSIGNFLAG : 0,
+ (i < 0) ? SCM_BIGSIGNFLAG : 0,
y, 0);
# else /* SCM_DIGSTOOBIG */
SCM_BIGDIG zdigs[SCM_DIGSPERLONG];
- scm_longdigs (SCM_INUM (x), zdigs);
- return scm_addbig (zdigs, SCM_DIGSPERLONG, (x < 0) ? SCM_BIGSIGNFLAG : 0,
+ scm_longdigs (i, zdigs);
+ return scm_addbig (zdigs, SCM_DIGSPERLONG, (i < 0) ? SCM_BIGSIGNFLAG : 0,
y, 0);
# endif /* SCM_DIGSTOOBIG */
}
SCM_ASRTGO (SCM_NIMP (y), bady);
if (SCM_BIGP (y))
{
+ long i = SCM_INUM (x);
#ifndef SCM_DIGSTOOBIG
- long z = scm_pseudolong (SCM_INUM (x));
+ long z = scm_pseudolong (i);
return scm_addbig ((SCM_BIGDIG *) & z, SCM_DIGSPERLONG,
- (x < 0) ? SCM_BIGSIGNFLAG : 0,
+ (i < 0) ? SCM_BIGSIGNFLAG : 0,
y, SCM_BIGSIGNFLAG);
#else
SCM_BIGDIG zdigs[SCM_DIGSPERLONG];
- scm_longdigs (SCM_INUM (x), zdigs);
- return scm_addbig (zdigs, SCM_DIGSPERLONG, (x < 0) ? SCM_BIGSIGNFLAG : 0,
+ scm_longdigs (i, zdigs);
+ return scm_addbig (zdigs, SCM_DIGSPERLONG, (i < 0) ? SCM_BIGSIGNFLAG : 0,
y, SCM_BIGSIGNFLAG);
#endif
}