Back to index

glibc  2.9
w_asin.c
Go to the documentation of this file.
00001 /* @(#)w_asin.c 5.1 93/09/24 */
00002 /*
00003  * ====================================================
00004  * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
00005  *
00006  * Developed at SunPro, a Sun Microsystems, Inc. business.
00007  * Permission to use, copy, modify, and distribute this
00008  * software is freely granted, provided that this notice
00009  * is preserved.
00010  * ====================================================
00011  */
00012 
00013 #if defined(LIBM_SCCS) && !defined(lint)
00014 static char rcsid[] = "$NetBSD: w_asin.c,v 1.6 1995/05/10 20:48:35 jtc Exp $";
00015 #endif
00016 
00017 /*
00018  * wrapper asin(x)
00019  */
00020 
00021 
00022 #include <math.h>
00023 #include "math_private.h"
00024 
00025 
00026 #ifdef __STDC__
00027        double __asin(double x)            /* wrapper asin */
00028 #else
00029        double __asin(x)                   /* wrapper asin */
00030        double x;
00031 #endif
00032 {
00033 #ifdef _IEEE_LIBM
00034        return __ieee754_asin(x);
00035 #else
00036        double z;
00037        z = __ieee754_asin(x);
00038        if(_LIB_VERSION == _IEEE_ || __isnan(x)) return z;
00039        if(fabs(x)>1.0) {
00040                return __kernel_standard(x,x,2); /* asin(|x|>1) */
00041        } else
00042            return z;
00043 #endif
00044 }
00045 weak_alias (__asin, asin)
00046 #ifdef NO_LONG_DOUBLE
00047 strong_alias (__asin, __asinl)
00048 weak_alias (__asin, asinl)
00049 #endif