[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile/guile-core/libguile numbers.c
From: |
Marius Vollmer |
Subject: |
guile/guile-core/libguile numbers.c |
Date: |
Sat, 05 May 2001 18:26:24 -0700 |
CVSROOT: /cvs
Module name: guile
Changes by: Marius Vollmer <address@hidden> 01/05/05 18:26:24
Modified files:
guile-core/libguile: numbers.c
Log message:
(scm_difference): Call SCM_WTA_DISPATCH_0 when zero
arguments are supplied.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/numbers.c.diff?cvsroot=OldCVS&tr1=1.125&tr2=1.126&r1=text&r2=text
Patches:
Index: guile/guile-core/libguile/numbers.c
diff -u guile/guile-core/libguile/numbers.c:1.125
guile/guile-core/libguile/numbers.c:1.126
--- guile/guile-core/libguile/numbers.c:1.125 Sat Apr 28 10:27:04 2001
+++ guile/guile-core/libguile/numbers.c Sat May 5 18:26:23 2001
@@ -3261,7 +3261,7 @@
{
if (SCM_UNBNDP (y)) {
if (SCM_UNBNDP (x)) {
- SCM_WTA_DISPATCH_0 (g_max, x, SCM_ARG1, s_max);
+ SCM_WTA_DISPATCH_0 (g_max, s_max);
} else if (SCM_NUMBERP (x)) {
return x;
} else {
@@ -3319,7 +3319,7 @@
{
if (SCM_UNBNDP (y)) {
if (SCM_UNBNDP (x)) {
- SCM_WTA_DISPATCH_0 (g_min, x, SCM_ARG1, s_min);
+ SCM_WTA_DISPATCH_0 (g_min, s_min);
} else if (SCM_NUMBERP (x)) {
return x;
} else {
@@ -3481,11 +3481,14 @@
* "all but the first argument are subtracted from the first\n"
* "argument."
*/
+#define FUNC_NAME s_difference
SCM
scm_difference (SCM x, SCM y)
{
if (SCM_UNBNDP (y)) {
- if (SCM_INUMP (x)) {
+ if (SCM_UNBNDP (x)) {
+ SCM_WTA_DISPATCH_0 (g_difference, s_difference);
+ } else if (SCM_INUMP (x)) {
long xx = -SCM_INUM (x);
if (SCM_FIXABLE (xx)) {
return SCM_MAKINUM (xx);
@@ -3603,7 +3606,7 @@
SCM_WTA_DISPATCH_2 (g_difference, x, y, SCM_ARG1, s_difference);
}
}
-
+#undef FUNC_NAME
SCM_GPROC1 (s_product, "*", scm_tc7_asubr, scm_product, g_product);
/* "Return the product of all arguments. If called without arguments,\n"
@@ -3757,6 +3760,7 @@
SCM_GPROC1 (s_divide, "/", scm_tc7_asubr, scm_divide, g_divide);
/* "Divide the first argument by the product of the remaining arguments."
*/
+#define FUNC_NAME s_divide
SCM
scm_divide (SCM x, SCM y)
{
@@ -3764,7 +3768,7 @@
if (SCM_UNBNDP (y)) {
if (SCM_UNBNDP (x)) {
- SCM_WTA_DISPATCH_0 (g_divide, x, SCM_ARG1, s_divide);
+ SCM_WTA_DISPATCH_0 (g_divide, s_divide);
} else if (SCM_INUMP (x)) {
if (SCM_EQ_P (x, SCM_MAKINUM (1L)) || SCM_EQ_P (x, SCM_MAKINUM (-1L))) {
return x;
@@ -3909,7 +3913,7 @@
SCM_WTA_DISPATCH_2 (g_divide, x, y, SCM_ARG1, s_divide);
}
}
-
+#undef FUNC_NAME
SCM_GPROC1 (s_asinh, "$asinh", scm_tc7_cxr, (SCM (*)()) scm_asinh, g_asinh);
/* "Return the inverse hyperbolic sine of @var{x}."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- guile/guile-core/libguile numbers.c,
Marius Vollmer <=