Changeset 14226 for release/1.5


Ignore:
Timestamp:
Aug 30, 2010, 3:26:03 PM (9 years ago)
Author:
rme
Message:

Merge r14224 (ATAN fixes) from trunk.

Location:
release/1.5/source
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • release/1.5/source

  • release/1.5/source/cocoa-ide

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • release/1.5/source/level-0/l0-float.lisp

    r13067 r14226  
    911911
    912912(eval-when (:execute :compile-toplevel)
     913  (defconstant single-float-pi (coerce pi 'single-float))
    913914  (defconstant double-float-half-pi (asin 1.0d0))
    914915  (defconstant single-float-half-pi (asin 1.0f0))
     
    964965
    965966
    966 (defun %df-atan2 (y x &optional result)
     967(defun %df-atan2 (y x)
    967968  (if (zerop x)
    968969    (if (zerop y)
    969970      (if (plusp (float-sign x))
    970         y
     971        (if (eql y -0.0d0)
     972          -0.0d0
     973          0.0d0)
    971974        (float-sign y pi))
    972975      (float-sign y double-float-half-pi))
    973     (%double-float-atan2! y x (or result (%make-dfloat)))))
     976    (%double-float-atan2! y x (%make-dfloat))))
    974977
    975978#+32-bit-target
    976 (defun %sf-atan2! (y x &optional result)
     979(defun %sf-atan2! (y x)
    977980  (if (zerop x)
    978981    (if (zerop y)
    979982      (if (plusp (float-sign x))
    980         y
    981         (float-sign y pi))
     983        ;; Don't return Y (which may be stack-consed) here.
     984        ;; We know that (ZEROP Y) is true, so:
     985        (if (eql y -0.0s0)
     986          -0.0s0
     987          0.0s0)
     988        (float-sign y single-float-pi))
    982989      (float-sign y single-float-half-pi))
    983     (%single-float-atan2! y x (or result (%make-sfloat)))))
     990    (%single-float-atan2! y x (%make-sfloat))))
    984991
    985992#+64-bit-target
     
    989996      (if (plusp (float-sign x))
    990997        y
    991         (float-sign y pi))
     998        (float-sign y single-float-pi))
    992999      (float-sign y single-float-half-pi))
    9931000    (%single-float-atan2 y x)))
Note: See TracChangeset for help on using the changeset viewer.