summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/mplibdir/mpmathdouble.w
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2014-01-06 14:44:38 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2014-01-06 14:44:38 +0000
commitc31f47d7025fbd5c796c81a1cb83bac8ca0ebedf (patch)
tree23af122b5e157684b2af3e2402a1490039daf446 /Build/source/texk/web2c/mplibdir/mpmathdouble.w
parent9f244d9f9a8aff3da16d30dedddba4aa3fa594ea (diff)
Bug fixes by Taco in MetaPost
git-svn-id: svn://tug.org/texlive/trunk@32592 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/mplibdir/mpmathdouble.w')
-rw-r--r--Build/source/texk/web2c/mplibdir/mpmathdouble.w6
1 files changed, 3 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/mplibdir/mpmathdouble.w b/Build/source/texk/web2c/mplibdir/mpmathdouble.w
index 41e4b7aa191..acff5ce8401 100644
--- a/Build/source/texk/web2c/mplibdir/mpmathdouble.w
+++ b/Build/source/texk/web2c/mplibdir/mpmathdouble.w
@@ -1,4 +1,4 @@
-% $Id: mpmathdouble.w 1915 2013-06-13 10:17:31Z taco $
+% $Id: mpmathdouble.w 1929 2014-01-02 09:53:51Z taco $
%
% This file is part of MetaPost;
% the MetaPost program is in the public domain.
@@ -402,7 +402,7 @@ void mp_number_fraction_to_scaled (mp_number *A) {
}
void mp_number_angle_to_scaled (mp_number *A) {
A->type = mp_scaled_type;
- A->data.dval = ROUND(A->data.dval) / angle_multiplier;
+ A->data.dval = A->data.dval / angle_multiplier;
}
void mp_number_scaled_to_fraction (mp_number *A) {
A->type = mp_fraction_type;
@@ -481,7 +481,7 @@ char * mp_double_number_tostring (MP mp, mp_number n) {
static char set[64];
int l = 0;
char *ret = mp_xmalloc(mp, 64, 1);
- snprintf(set, 64, "%32.16g", n.data.dval);
+ snprintf(set, 64, "%32.15g", n.data.dval); /* 16 is too much */
while (set[l] == ' ') l++;
strcpy(ret, set+l);
return ret;