(scm_max, scm_min): For one arg, dispatch to generic for
authorKevin Ryde <user42@zip.com.au>
Sat, 21 Feb 2004 21:58:30 +0000 (21:58 +0000)
committerKevin Ryde <user42@zip.com.au>
Sat, 21 Feb 2004 21:58:30 +0000 (21:58 +0000)
complex, same as for two args.  (Handle only inum, big, real, frac).

libguile/numbers.c

index 62515ed..8c7c87c 100644 (file)
@@ -3383,7 +3383,7 @@ scm_max (SCM x, SCM y)
     {
       if (SCM_UNBNDP (x))
        SCM_WTA_DISPATCH_0 (g_max, s_max);
-      else if (SCM_NUMBERP (x))
+      else if (SCM_INUMP(x) || SCM_BIGP(x) || SCM_REALP(x) || SCM_FRACTIONP(x))
        return x;
       else
        SCM_WTA_DISPATCH_1 (g_max, x, SCM_ARG1, s_max);
@@ -3532,7 +3532,7 @@ scm_min (SCM x, SCM y)
     {
       if (SCM_UNBNDP (x))
        SCM_WTA_DISPATCH_0 (g_min, s_min);
-      else if (SCM_NUMBERP (x))
+      else if (SCM_INUMP(x) || SCM_BIGP(x) || SCM_REALP(x) || SCM_FRACTIONP(x))
        return x;
       else
        SCM_WTA_DISPATCH_1 (g_min, x, SCM_ARG1, s_min);