/[guile]/guile/guile-core/libguile/numbers.c
ViewVC logotype

Diff of /guile/guile-core/libguile/numbers.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.173 by mvo, Sun Nov 3 21:57:48 2002 UTC revision 1.174 by mdj, Thu Mar 6 12:50:41 2003 UTC
# Line 1  Line 1 
1  /* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc.  /* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002, 2003 Free Software Foundation, Inc.
2   *   *
3   * Portions Copyright 1990, 1991, 1992, 1993 by AT&T Bell Laboratories   * Portions Copyright 1990, 1991, 1992, 1993 by AT&T Bell Laboratories
4   * and Bellcore.  See scm_divide.   * and Bellcore.  See scm_divide.
# Line 289  SCM_DEFINE (scm_nan, "nan", 0, 0, 0, Line 289  SCM_DEFINE (scm_nan, "nan", 0, 0, 0,
289  #undef FUNC_NAME  #undef FUNC_NAME
290    
291    
292  SCM_GPROC (s_abs, "abs", 1, 0, 0, scm_abs, g_abs);  SCM_PRIMITIVE_GENERIC (scm_abs, "abs", 1, 0, 0,
293  /* "Return the absolute value of @var{x}."                         (SCM x),
294   */                         "Return the absolute value of @var{x}.")
295  SCM  #define FUNC_NAME
 scm_abs (SCM x)  
296  {  {
297    if (SCM_INUMP (x)) {    if (SCM_INUMP (x)) {
298      long int xx = SCM_INUM (x);      long int xx = SCM_INUM (x);
# Line 317  scm_abs (SCM x) Line 316  scm_abs (SCM x)
316    } else if (SCM_REALP (x)) {    } else if (SCM_REALP (x)) {
317      return scm_make_real (fabs (SCM_REAL_VALUE (x)));      return scm_make_real (fabs (SCM_REAL_VALUE (x)));
318    } else {    } else {
319      SCM_WTA_DISPATCH_1 (g_abs, x, 1, s_abs);      SCM_WTA_DISPATCH_1 (g_scm_abs, x, 1, s_scm_abs);
320    }    }
321  }  }
322    #undef FUNC_NAME
323    
324    
325  SCM_GPROC (s_quotient, "quotient", 2, 0, 0, scm_quotient, g_quotient);  SCM_GPROC (s_quotient, "quotient", 2, 0, 0, scm_quotient, g_quotient);

Legend:
Removed from v.1.173  
changed lines
  Added in v.1.174

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26