Ignore:
Timestamp:
Feb 4, 2013, 6:52:19 PM (7 years ago)
Author:
gb
Message:

Propagate r15683 to trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/1.9/source/level-0/l0-numbers.lisp

    r15650 r15685  
    15911591(defun cis (theta)
    15921592  "Return cos(Theta) + i sin(Theta), i.e. exp(i Theta)."
    1593   (if (complexp theta)
    1594     (error "Argument to CIS is complex: ~S" theta)
    1595     (complex (cos theta) (sin theta))))
     1593  (cond ((complexp theta)
     1594         (error "Argument to CIS is complex: ~S" theta))
     1595        ((or (typep theta 'ratio)
     1596             (> (abs theta) #.(ash 1 23)))
     1597         (if (typep theta 'double-float)
     1598           (%extended-cis theta)
     1599           (coerce (%extended-cis theta) '(complex single-float))))
     1600        (t
     1601         (complex (cos theta) (sin theta)))))
    15961602
    15971603
Note: See TracChangeset for help on using the changeset viewer.