]> git.proxmox.com Git - mirror_edk2.git/blame - StdLib/LibC/Math/w_asin.c
ArmPkg: ArmLib: purge incorrect ArmDrainWriteBuffer () alias
[mirror_edk2.git] / StdLib / LibC / Math / w_asin.c
CommitLineData
2aa62f2b 1/* @(#)w_asin.c 5.1 93/09/24 */\r
2/*\r
3 * ====================================================\r
4 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\r
5 *\r
6 * Developed at SunPro, a Sun Microsystems, Inc. business.\r
7 * Permission to use, copy, modify, and distribute this\r
8 * software is freely granted, provided that this notice\r
9 * is preserved.\r
10 * ====================================================\r
11 */\r
12#include <LibConfig.h>\r
13#include <sys/EfiCdefs.h>\r
14#if defined(LIBM_SCCS) && !defined(lint)\r
15__RCSID("$NetBSD: w_asin.c,v 1.9 2002/05/26 22:01:59 wiz Exp $");\r
16#endif\r
17\r
18/*\r
19 * wrapper asin(x)\r
20 */\r
21\r
22\r
23#include "math.h"\r
24#include "math_private.h"\r
25\r
26\r
27double\r
28asin(double x) /* wrapper asin */\r
29{\r
30#ifdef _IEEE_LIBM\r
31 return __ieee754_asin(x);\r
32#else\r
33 double z;\r
34 z = __ieee754_asin(x);\r
35 if(_LIB_VERSION == _IEEE_ || isnan(x)) return z;\r
36 if(fabs(x)>1.0) {\r
37 return __kernel_standard(x,x,2); /* asin(|x|>1) */\r
38 } else\r
39 return z;\r
40#endif\r
41}\r