Print this page
5261 libm should stop using synonyms.h


  39  * Special cases:
  40  *
  41  *      ATAN2((anything), NaN ) is NaN;
  42  *      ATAN2(NAN , (anything) ) is NaN;
  43  *      ATAN2(+-0, +(anything but NaN)) is +-0  ;
  44  *      ATAN2(+-0, -(anything but NaN)) is +-PI ;
  45  *      ATAN2(+-(anything but 0 and NaN), 0) is +-PI/2;
  46  *      ATAN2(+-(anything but INF and NaN), +INF) is +-0 ;
  47  *      ATAN2(+-(anything but INF and NaN), -INF) is +-PI;
  48  *      ATAN2(+-INF,+INF ) is +-PI/4 ;
  49  *      ATAN2(+-INF,-INF ) is +-3PI/4;
  50  *      ATAN2(+-INF, (anything but,0,NaN, and INF)) is +-PI/2;
  51  *
  52  * Constants:
  53  * The hexadecimal values are the intended ones for the following constants.
  54  * The decimal values may be used, provided that the compiler will convert
  55  * from decimal to binary accurately enough to produce the hexadecimal values
  56  * shown.
  57  */
  58 
  59 #pragma weak atan2l = __atan2l
  60 
  61 #include "libm.h"
  62 #include "longdouble.h"
  63 
  64 static const long double
  65         zero    =  0.0L,
  66         tiny    =  1.0e-40L,
  67         one     =  1.0L,
  68         half    =  0.5L,
  69         PI3o4   =  2.356194490192344928846982537459627163148L,
  70         PIo4    =  0.785398163397448309615660845819875721049L,
  71         PIo2    =  1.570796326794896619231321691639751442099L,
  72         PI      =  3.141592653589793238462643383279502884197L,
  73         PI_lo   =  8.671810130123781024797044026043351968762e-35L;
  74 
  75 long double
  76 atan2l(long double y, long double x) {
  77         long double t, z;
  78         int k, m, signy, signx;
  79 




  39  * Special cases:
  40  *
  41  *      ATAN2((anything), NaN ) is NaN;
  42  *      ATAN2(NAN , (anything) ) is NaN;
  43  *      ATAN2(+-0, +(anything but NaN)) is +-0  ;
  44  *      ATAN2(+-0, -(anything but NaN)) is +-PI ;
  45  *      ATAN2(+-(anything but 0 and NaN), 0) is +-PI/2;
  46  *      ATAN2(+-(anything but INF and NaN), +INF) is +-0 ;
  47  *      ATAN2(+-(anything but INF and NaN), -INF) is +-PI;
  48  *      ATAN2(+-INF,+INF ) is +-PI/4 ;
  49  *      ATAN2(+-INF,-INF ) is +-3PI/4;
  50  *      ATAN2(+-INF, (anything but,0,NaN, and INF)) is +-PI/2;
  51  *
  52  * Constants:
  53  * The hexadecimal values are the intended ones for the following constants.
  54  * The decimal values may be used, provided that the compiler will convert
  55  * from decimal to binary accurately enough to produce the hexadecimal values
  56  * shown.
  57  */
  58 
  59 #pragma weak __atan2l = atan2l
  60 
  61 #include "libm.h"
  62 #include "longdouble.h"
  63 
  64 static const long double
  65         zero    =  0.0L,
  66         tiny    =  1.0e-40L,
  67         one     =  1.0L,
  68         half    =  0.5L,
  69         PI3o4   =  2.356194490192344928846982537459627163148L,
  70         PIo4    =  0.785398163397448309615660845819875721049L,
  71         PIo2    =  1.570796326794896619231321691639751442099L,
  72         PI      =  3.141592653589793238462643383279502884197L,
  73         PI_lo   =  8.671810130123781024797044026043351968762e-35L;
  74 
  75 long double
  76 atan2l(long double y, long double x) {
  77         long double t, z;
  78         int k, m, signy, signx;
  79