Changeset 3645
- Timestamp:
- 09/10/03 01:23:30 (19 years ago)
- Location:
- trunk/j/src/org/armedbear/lisp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/lisp/autoloads.lisp
r3610 r3645 2 2 ;;; 3 3 ;;; Copyright (C) 2003 Peter Graves 4 ;;; $Id: autoloads.lisp,v 1.1 7 2003-09-08 02:24:46piso Exp $4 ;;; $Id: autoloads.lisp,v 1.18 2003-09-10 01:23:30 piso Exp $ 5 5 ;;; 6 6 ;;; This program is free software; you can redistribute it and/or … … 74 74 (autoload 'make-pathname) 75 75 (autoload '(signum floor ceiling round rem mod ftruncate ffloor fceiling fround 76 rational rationalize gcd isqrt phase)76 rational rationalize gcd isqrt float-sign phase) 77 77 "numbers.lisp") -
trunk/j/src/org/armedbear/lisp/numbers.lisp
r3610 r3645 2 2 ;;; 3 3 ;;; Copyright (C) 2003 Peter Graves 4 ;;; $Id: numbers.lisp,v 1.1 2 2003-09-08 02:24:05piso Exp $4 ;;; $Id: numbers.lisp,v 1.13 2003-09-10 01:22:57 piso Exp $ 5 5 ;;; 6 6 ;;; This program is free software; you can redistribute it and/or … … 156 156 (error 'type-error "wrong type: ~S is not a real number" x)))) 157 157 158 158 159 ;;; FIXME 159 160 (defun rationalize (x) 160 161 (rational x)) 161 162 (when (and (find-package "JVM")163 (fboundp 'jvm::jvm-compile))164 (mapcar #'jvm::jvm-compile '(floor165 ceiling166 round167 rem168 ftruncate169 ffloor170 fceiling171 fround172 rational173 rationalize)))174 175 162 176 163 … … 213 200 214 201 202 (defun float-sign (float1 &optional (float2 (float 1 float1))) 203 "Returns a floating-point number that has the same sign as 204 float1 and, if float2 is given, has the same absolute value 205 as float2." 206 (* (if (minusp float1) 207 (float -1 float1) 208 (float 1 float1)) 209 (abs float2))) 210 211 215 212 (defun phase (number) 216 213 "Returns the angle part of the polar representation of a complex number. … … 233 230 (complex 234 231 (atan (imagpart number) (realpart number))))) 232 233 234 (when (and (find-package "JVM") 235 (fboundp 'jvm::jvm-compile)) 236 (mapcar #'jvm::jvm-compile '(floor 237 ceiling 238 round 239 rem 240 ftruncate 241 ffloor 242 fceiling 243 fround 244 rational 245 rationalize)))
Note: See TracChangeset
for help on using the changeset viewer.