Changeset 6153


Ignore:
Timestamp:
03/09/04 11:53:58 (17 years ago)
Author:
piso
Message:

Moved FLOOR to floor.java.

Location:
trunk/j/src/org/armedbear/lisp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/autoloads.lisp

    r6143 r6153  
    22;;;
    33;;; Copyright (C) 2003-2004 Peter Graves
    4 ;;; $Id: autoloads.lisp,v 1.121 2004-03-09 02:04:36 piso Exp $
     4;;; $Id: autoloads.lisp,v 1.122 2004-03-09 11:53:58 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    7777          "pathnames.lisp")
    7878(autoload 'directory "directory.lisp")
    79 (autoload '(signum floor ceiling round rem mod ffloor fceiling fround
     79(autoload '(signum ceiling round rem mod ffloor fceiling fround
    8080            rational rationalize gcd isqrt float-precision float-sign
    8181            decode-float conjugate phase cis)
  • trunk/j/src/org/armedbear/lisp/numbers.lisp

    r6118 r6153  
    22;;;
    33;;; Copyright (C) 2003-2004 Peter Graves
    4 ;;; $Id: numbers.lisp,v 1.22 2004-03-07 01:09:00 piso Exp $
     4;;; $Id: numbers.lisp,v 1.23 2004-03-09 11:53:43 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    2929    (if (plusp number) 1 -1)
    3030    (/ number (abs number)))))
    31 
    32 
    33 ;;; If the numbers do not divide exactly and the result of (/ number divisor)
    34 ;;; would be negative then decrement the quotient and augment the remainder by
    35 ;;; the divisor.
    36 ;;;
    37 (defun floor (number &optional (divisor 1))
    38   "Returns the greatest integer not greater than number, or number/divisor.
    39   The second returned value is (mod number divisor)."
    40   (multiple-value-bind (tru rem) (truncate number divisor)
    41     (if (and (not (zerop rem))
    42        (if (minusp divisor)
    43      (plusp number)
    44      (minusp number)))
    45   (values (1- tru) (+ rem divisor))
    46   (values tru rem))))
    4731
    4832
     
    253237
    254238(when (and (fboundp 'jvm::jvm-compile) (not (autoloadp 'jvm::jvm-compile)))
    255   (mapcar #'jvm::jvm-compile '(floor
    256                                ceiling
     239  (mapcar #'jvm::jvm-compile '(ceiling
    257240                               round
    258241                               rem
Note: See TracChangeset for help on using the changeset viewer.