summaryrefslogtreecommitdiff
path: root/src/internal
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-04-12 00:25:52 -0400
committerRich Felker <dalias@aerifal.cx>2012-04-12 00:25:52 -0400
commit3ddeedd8f75be8a3dc2a167746f36f871d7e595a (patch)
tree6f40cb224afed8aee44ca3df96fda681c701da17 /src/internal
parentfe514951af4e67f05d17d796251af9a8229761eb (diff)
downloadmusl-3ddeedd8f75be8a3dc2a167746f36f871d7e595a.tar.gz
musl-3ddeedd8f75be8a3dc2a167746f36f871d7e595a.tar.bz2
musl-3ddeedd8f75be8a3dc2a167746f36f871d7e595a.tar.xz
musl-3ddeedd8f75be8a3dc2a167746f36f871d7e595a.zip
remove magic numbers from floatscan
Diffstat (limited to 'src/internal')
-rw-r--r--src/internal/floatscan.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/internal/floatscan.c b/src/internal/floatscan.c
index 0e1f6d06..10123bfa 100644
--- 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;