Changeset 4590


Ignore:
Timestamp:
10/31/03 19:25:39 (19 years ago)
Author:
piso
Message:

CIS

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

Legend:

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

    r4579 r4590  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: autoloads.lisp,v 1.55 2003-10-30 18:41:36 piso Exp $
     4;;; $Id: autoloads.lisp,v 1.56 2003-10-31 19:25:39 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    7474(autoload 'make-pathname)
    7575(autoload '(signum floor ceiling round rem mod ftruncate ffloor fceiling fround
    76             rational rationalize gcd isqrt float-sign phase)
     76            rational rationalize gcd isqrt float-sign phase cis)
    7777          "numbers.lisp")
    7878(autoload 'boole)
  • trunk/j/src/org/armedbear/lisp/numbers.lisp

    r4549 r4590  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: numbers.lisp,v 1.16 2003-10-27 04:44:18 dmcnaught Exp $
     4;;; $Id: numbers.lisp,v 1.17 2003-10-31 19:25:17 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    239239                  (atan (imagpart number) (realpart number))))))
    240240
    241 (when (and (find-package "JVM")
    242            (fboundp 'jvm::jvm-compile))
     241(defun cis (theta)
     242  "Return cos(Theta) + i sin(Theta), AKA exp(i Theta)."
     243  (if (complexp theta)
     244      (error "argument to CIS is complex: ~S" theta)
     245      (complex (cos theta) (sin theta))))
     246
     247(when (fboundp 'jvm::jvm-compile)
    243248  (mapcar #'jvm::jvm-compile '(floor
    244249                               ceiling
Note: See TracChangeset for help on using the changeset viewer.