]> git.proxmox.com Git - mirror_edk2.git/blame - StdLib/LibC/Math/s_ldexp.c
Fix a bug about the iSCSI DHCP dependency issue.
[mirror_edk2.git] / StdLib / LibC / Math / s_ldexp.c
CommitLineData
2aa62f2b 1/* @(#)s_ldexp.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: s_ldexp.c,v 1.9 2002/05/26 22:01:56 wiz Exp $");\r
16#endif\r
17\r
18#include <errno.h>\r
19#include "math.h"\r
20#include "math_private.h"\r
21\r
22double\r
23ldexp(double value, int exp)\r
24{\r
25 if(!finite(value)||value==0.0) return value;\r
26 value = scalbn(value,exp);\r
27 if(!finite(value)||value==0.0) errno = ERANGE;\r
28 return value;\r
29}\r