#| -*-Scheme-*-
-$Id: arith.scm,v 1.58 2003/04/19 04:23:41 cph Exp $
+$Id: arith.scm,v 1.59 2004/06/12 02:14:41 cph Exp $
Copyright 1989,1990,1991,1992,1993,1994 Massachusetts Institute of Technology
Copyright 1995,1996,1997,1999,2001,2002 Massachusetts Institute of Technology
-Copyright 2003 Massachusetts Institute of Technology
+Copyright 2003,2004 Massachusetts Institute of Technology
This file is part of MIT/GNU Scheme.
(define flo:significand-digits-base-2)
(define flo:significand-digits-base-10)
(define int:flonum-integer-limit)
+(define fix:largest-value)
+(define fix:smallest-value)
(define (initialize-microcode-dependencies!)
(let ((p microcode-id/floating-mantissa-bits))
(set! int:flonum-integer-limit (int:expt 2 p)))
unspecific)
+(define (largest-fixnum)
+ fix:largest-value)
+
+(define (smallest-fixnum)
+ fix:smallest-value)
+
(define (initialize-package!)
(initialize-microcode-dependencies!)
(add-event-receiver! event:after-restore initialize-microcode-dependencies!)
(max/min max complex:max)
(max/min min complex:min))
+ (let loop ((n 1))
+ (if (fix:fixnum? n)
+ (loop (* n 2))
+ (let ((n (- n 1)))
+ (if (not (fix:fixnum? n))
+ (error "Unable to compute largest fixnum:" n))
+ (set! fix:largest-value n))))
+ (let loop ((n -1))
+ (if (fix:fixnum? n)
+ (loop (* n 2))
+ (let ((n (quotient n 2)))
+ (if (not (fix:fixnum? n))
+ (error "Unable to compute smallest fixnum:" n))
+ (set! fix:smallest-value n))))
+
unspecific)
\f
(define (int:max n m)
#| -*-Scheme-*-
-$Id: runtime.pkg,v 14.486 2004/06/07 19:47:57 cph Exp $
+$Id: runtime.pkg,v 14.487 2004/06/12 02:14:56 cph Exp $
Copyright 1988,1989,1990,1991,1992,1993 Massachusetts Institute of Technology
Copyright 1994,1995,1996,1997,1998,1999 Massachusetts Institute of Technology
inexact?
integer-divide-quotient
integer-divide-remainder
+ largest-fixnum
lcm
max
min
odd?
quotient
remainder
+ smallest-fixnum
square)
(initialization
(begin