/[cmucl]/src/code/irrat.lisp
ViewVC logotype

Diff of /src/code/irrat.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.45.2.1.2.1.2.2 by rtoy, Thu Jun 29 01:28:02 2006 UTC revision 1.45.2.1.2.1.2.3 by rtoy, Thu Jun 29 14:50:27 2006 UTC
# Line 375  Line 375 
375          (((foreach (complex rational) (complex float)) rational)          (((foreach (complex rational) (complex float)) rational)
376           (* (expt (abs base) power)           (* (expt (abs base) power)
377              (cis (* power (phase base)))))              (cis (* power (phase base)))))
378          (((foreach fixnum (or bignum ratio) single-float double-float)          (((foreach fixnum (or bignum ratio) single-float double-float
379                       #+double-double double-double-float)
380            complex)            complex)
381           (if (and (zerop base) (plusp (realpart power)))           (if (and (zerop base) (plusp (realpart power)))
382               (* base power)               (* base power)
383               (exp (* power (log base)))))               (exp (* power (log base)))))
384          (((foreach (complex float) (complex rational))          (((foreach (complex float) (complex rational))
385            (foreach complex double-float single-float))            (foreach complex double-float single-float #+double-double double-double-float))
386           (if (and (zerop base) (plusp (realpart power)))           (if (and (zerop base) (plusp (realpart power)))
387               (* base power)               (* base power)
388               (exp (* power (log base)))))))))               (exp (* power (log base)))))))))
# Line 433  Line 434 
434                 (((foreach single-float fixnum bignum ratio)                 (((foreach single-float fixnum bignum ratio)
435                   double-float)                   double-float)
436                  (/ (log (coerce number 'double-float)) (log base)))                  (/ (log (coerce number 'double-float)) (log base)))
437                   #+double-double
438                   ((double-double-float
439                     (foreach double-double-float double-float single-float fixnum bignum ratio))
440                    (/ (log number) (log (coerce base 'double-double-float))))
441                   #+double-double
442                   (((foreach double-float single-float fixnum bignum ratio)
443                     double-double-float)
444                    (/ (log (coerce number 'double-double-float)) (log base)))
445                 (((foreach single-float fixnum bignum ratio)                 (((foreach single-float fixnum bignum ratio)
446                   (foreach single-float fixnum bignum ratio))                   (foreach single-float fixnum bignum ratio))
447                  ;; Converting everything to double-float helps the                  ;; Converting everything to double-float helps the
# Line 494  Line 503 
503                       '(dispatch-type number))))                       '(dispatch-type number))))
504          #+double-double          #+double-double
505          ((double-double-float)          ((double-double-float)
          ;; Hack!  
506           (let ((hi (kernel:double-double-hi number)))           (let ((hi (kernel:double-double-hi number)))
507             (if (< (float-sign hi) 0d0)             (if (< (float-sign hi) 0d0)
508                 (complex (dd-%log (- number)) dd-pi)                 (complex (dd-%log (- number)) dd-pi)

Legend:
Removed from v.1.45.2.1.2.1.2.2  
changed lines
  Added in v.1.45.2.1.2.1.2.3

  ViewVC Help
Powered by ViewVC 1.1.5