Changeset 14224
 Timestamp:
 Aug 30, 2010, 2:34:27 AM (9 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/source/level0/l0float.lisp
r14151 r14224 915 915 916 916 (evalwhen (:execute :compiletoplevel) 917 (defconstant singlefloatpi (coerce pi 'singlefloat)) 917 918 (defconstant doublefloathalfpi (asin 1.0d0)) 918 919 (defconstant singlefloathalfpi (asin 1.0f0)) … … 968 969 969 970 970 (defun %dfatan2 (y x &optional result)971 (defun %dfatan2 (y x) 971 972 (if (zerop x) 972 973 (if (zerop y) 973 974 (if (plusp (floatsign x)) 974 y 975 (if (eql y 0.0d0) 976 0.0d0 977 0.0d0) 975 978 (floatsign y pi)) 976 979 (floatsign y doublefloathalfpi)) 977 (%doublefloatatan2! y x ( or result (%makedfloat)))))980 (%doublefloatatan2! y x (%makedfloat)))) 978 981 979 982 #+32bittarget 980 (defun %sfatan2! (y x &optional result)983 (defun %sfatan2! (y x) 981 984 (if (zerop x) 982 985 (if (zerop y) 983 986 (if (plusp (floatsign x)) 984 y 985 (floatsign y pi)) 987 ;; Don't return Y (which may be stackconsed) here. 988 ;; We know that (ZEROP Y) is true, so: 989 (if (eql y 0.0s0) 990 0.0s0 991 0.0s0) 992 (floatsign y singlefloatpi)) 986 993 (floatsign y singlefloathalfpi)) 987 (%singlefloatatan2! y x ( or result (%makesfloat)))))994 (%singlefloatatan2! y x (%makesfloat)))) 988 995 989 996 #+64bittarget … … 993 1000 (if (plusp (floatsign x)) 994 1001 y 995 (floatsign y pi))1002 (floatsign y singlefloatpi)) 996 1003 (floatsign y singlefloathalfpi)) 997 1004 (%singlefloatatan2 y x)))
Note: See TracChangeset
for help on using the changeset viewer.