Back to index

glibc  2.9
w_atan2f.c
Go to the documentation of this file.
00001 /* w_atan2f.c -- float version of w_atan2.c.
00002  * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
00003  */
00004 
00005 /*
00006  * ====================================================
00007  * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
00008  *
00009  * Developed at SunPro, a Sun Microsystems, Inc. business.
00010  * Permission to use, copy, modify, and distribute this
00011  * software is freely granted, provided that this notice
00012  * is preserved.
00013  * ====================================================
00014  */
00015 
00016 #if defined(LIBM_SCCS) && !defined(lint)
00017 static char rcsid[] = "$NetBSD: w_atan2f.c,v 1.3 1995/05/10 20:48:42 jtc Exp $";
00018 #endif
00019 
00020 /*
00021  * wrapper atan2f(y,x)
00022  */
00023 
00024 #include <math.h>
00025 #include "math_private.h"
00026 
00027 
00028 #ifdef __STDC__
00029        float __atan2f(float y, float x)          /* wrapper atan2f */
00030 #else
00031        float __atan2f(y,x)                /* wrapper atan2 */
00032        float y,x;
00033 #endif
00034 {
00035 #ifdef _IEEE_LIBM
00036        return __ieee754_atan2f(y,x);
00037 #else
00038        float z;
00039        z = __ieee754_atan2f(y,x);
00040        if(_LIB_VERSION != _SVID_||__isnanf(x)||__isnanf(y)) return z;
00041        if(x==0.0&&y==0.0)
00042          return __kernel_standard(y,x,103); /* atan2(+-0,+-0) */
00043        return z;
00044 #endif
00045 }
00046 weak_alias (__atan2f, atan2f)