oops, do set errno in ldexp() (blanket rules)
This commit is contained in:
parent
f99b94ded1
commit
11c958956f
@ -6,6 +6,7 @@
|
||||
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
#include <errno.h>
|
||||
|
||||
double
|
||||
ldexp(double fl, int exp)
|
||||
@ -22,6 +23,7 @@ ldexp(double fl, int exp)
|
||||
exp += currexp;
|
||||
if (exp > 0) {
|
||||
if (exp > DBL_MAX_EXP) {
|
||||
errno = ERANGE;
|
||||
return sign * HUGE_VAL;
|
||||
}
|
||||
while (exp>30) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user