summaryrefslogtreecommitdiff
path: root/Build/source/texk
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-10-15 12:46:05 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2015-10-15 12:46:05 +0000
commit7a625a16a1f5059f3ab26c49b094515d1f7d722e (patch)
tree060bf2b535576e6210d1af9d88ff800f07323f3f /Build/source/texk
parent443caaed8dfcfd314acf6b8015a2c683c749b978 (diff)
web2c/mplibdir: Sync with the upstream.
git-svn-id: svn://tug.org/texlive/trunk@38645 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r--Build/source/texk/web2c/mplibdir/ChangeLog6
-rw-r--r--Build/source/texk/web2c/mplibdir/mpmathbinary.w4
2 files changed, 7 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/mplibdir/ChangeLog b/Build/source/texk/web2c/mplibdir/ChangeLog
index c3db5d08ce2..2fea7b05585 100644
--- a/Build/source/texk/web2c/mplibdir/ChangeLog
+++ b/Build/source/texk/web2c/mplibdir/ChangeLog
@@ -1,6 +1,10 @@
+2015-10-15 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * mpmathbinary.w: Sync with the upstream.
+
2015-10-07 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
- *mpmath.w, mpmathbinary.w, mpmathdecimal.w, mp.w, mpmathdouble.w:
+ * mpmath.w, mpmathbinary.w, mpmathdecimal.w, mp.w, mpmathdouble.w:
Sync with the upstream trunk.
2015-09-21 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
diff --git a/Build/source/texk/web2c/mplibdir/mpmathbinary.w b/Build/source/texk/web2c/mplibdir/mpmathbinary.w
index 43edabab86c..f20061de46a 100644
--- a/Build/source/texk/web2c/mplibdir/mpmathbinary.w
+++ b/Build/source/texk/web2c/mplibdir/mpmathbinary.w
@@ -896,14 +896,14 @@ void mp_wrapup_numeric_token(MP mp, unsigned char *start, unsigned char *stop) {
invalid = mpfr_set_str(result,buf, 10, ROUNDING);
//fprintf(stdout,"scan of [%s] produced %s, ", buf, mp_binnumber_tostring(result));
lp = (unsigned long) l;
-
/* strip leading - or + or 0 or .*/
if ( (*bufp=='-') || (*bufp=='+') || (*bufp=='0') || (*bufp=='.') ) { lp--; bufp++;}
/* strip also . */
lp = strchr(bufp,'.') ? lp-1: lp;
/* strip also trailing 0s */
bufp = buf+l-1;
- while(*bufp == '0') {bufp--; lp--;}
+ while(*bufp == '0') {bufp--; lp=( (lp==0)||(lp==1)?1:lp--);}
+ /* force at last one digit, even if the number is 0 */
lp = lp>0? lp: 1;
/* bits needed for buf */
lpbit = (unsigned long)ceil(lp/log10(2)+1);