www.delorie.com/gnu/docs/guile/guile_176.html   search  
 
Buy GNU books!


Guile Reference Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

21.2.7 Operations on Integer Values

Scheme Procedure: odd? n
C Function: scm_odd_p (n)
Return #t if n is an odd number, #f otherwise.

Scheme Procedure: even? n
C Function: scm_even_p (n)
Return #t if n is an even number, #f otherwise.

Scheme Procedure: quotient
Return the quotient of the numbers x and y.

Scheme Procedure: remainder
Return the remainder of the numbers x and y.
 
(remainder 13 4) => 1
(remainder -13 4) => -1

Scheme Procedure: modulo
Return the modulo of the numbers x and y.
 
(modulo 13 4) => 1
(modulo -13 4) => 3

Scheme Procedure: gcd
Return the greatest common divisor of all arguments. If called without arguments, 0 is returned.

Scheme Procedure: lcm
Return the least common multiple of the arguments. If called without arguments, 1 is returned.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003