2 * ====================================================
3 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
5 * Developed at SunPro, a Sun Microsystems, Inc. business.
6 * Permission to use, copy, modify, and distribute this
7 * software is freely granted, provided that this notice
9 * ====================================================
13 #include "math_private.h"
18 * "If the integer expression (math_errhandling & MATH_ERRNO) is non-zero,
19 * then errno shall be set to [ERANGE]. If the integer expression
20 * (math_errhandling & MATH_ERREXCEPT) is non-zero, then the underflow
21 * floating-point exception shall be raised."
23 * *And it says the same about scalbn*! Thus these two functions
24 * are the same and can be just aliased.
26 * Currently, ldexp tries to be vaguely POSIX compliant while scalbn
27 * does not (it does not set ERRNO).
30 double ldexp(double value
, int _exp
)
32 if (!isfinite(value
) || value
== 0.0)
34 value
= scalbn(value
, _exp
);
35 if (!isfinite(value
) || value
== 0.0)
39 libm_hidden_def(ldexp
)