projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe51495
)
remove magic numbers from floatscan
author
Rich Felker
<dalias@aerifal.cx>
Thu, 12 Apr 2012 04:25:52 +0000
(
00:25
-0400)
committer
Rich Felker
<dalias@aerifal.cx>
Thu, 12 Apr 2012 04:25:52 +0000
(
00:25
-0400)
src/internal/floatscan.c
patch
|
blob
|
history
diff --git
a/src/internal/floatscan.c
b/src/internal/floatscan.c
index 0e1f6d06a4ad7593bf909d9c7f38586ee469f147..10123bfa4437ba64c0a15b664f4a48d9da2f6f64 100644
(file)
--- a/
src/internal/floatscan.c
+++ b/
src/internal/floatscan.c
@@
-403,16
+403,16
@@
long double __floatscan(FILE *f, int c, int prec, int pok)
switch (prec) {
case 0:
- bits =
24
;
- emin =
-149
;
+ bits =
FLT_MANT_DIG
;
+ emin =
FLT_MIN_EXP-bits
;
break;
case 1:
- bits =
53
;
- emin =
-1074
;
+ bits =
DBL_MANT_DIG
;
+ emin =
DBL_MIN_EXP-bits
;
break;
case 2:
bits = LDBL_MANT_DIG;
- emin =
-16445
;
+ emin =
LDBL_MIN_EXP-bits
;
break;
default:
return 0;