texlive[56147] Build/source/texk/web2c/mplibdir: metapost: sync with
commits+kakuto at tug.org
commits+kakuto at tug.org
Fri Aug 21 22:56:11 CEST 2020
Revision: 56147
http://tug.org/svn/texlive?view=revision&revision=56147
Author: kakuto
Date: 2020-08-21 22:56:11 +0200 (Fri, 21 Aug 2020)
Log Message:
-----------
metapost: sync with the upstream
Modified Paths:
--------------
trunk/Build/source/texk/web2c/mplibdir/ChangeLog
trunk/Build/source/texk/web2c/mplibdir/mp.w
trunk/Build/source/texk/web2c/mplibdir/mpmathbinary.w
trunk/Build/source/texk/web2c/mplibdir/mpmathdecimal.w
Modified: trunk/Build/source/texk/web2c/mplibdir/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/mplibdir/ChangeLog 2020-08-20 23:53:46 UTC (rev 56146)
+++ trunk/Build/source/texk/web2c/mplibdir/ChangeLog 2020-08-21 20:56:11 UTC (rev 56147)
@@ -1,3 +1,10 @@
+2020-08-21 Luigi Scarso <luigi.scarso at gmail.com>
+ * Changed epsilon in binary and decimal mode from 1E-52 to
+ 2^-173 =~0.835E-52, so that mp_solve_rising_cubic now works as
+ expected.
+ * Fix @<Set the height and depth to zero if the bounding box is empty@>
+ in mp_set_text_box when height and depth are both -inf.
+
2020-02-18 Luigi Scarso <luigi.scarso at gmail.com>
* better mp_snprintf macro
Modified: trunk/Build/source/texk/web2c/mplibdir/mp.w
===================================================================
--- trunk/Build/source/texk/web2c/mplibdir/mp.w 2020-08-20 23:53:46 UTC (rev 56146)
+++ trunk/Build/source/texk/web2c/mplibdir/mp.w 2020-08-21 20:56:11 UTC (rev 56147)
@@ -34468,8 +34468,12 @@
size_t k, kk; /* current character and character to stop at */
four_quarters cc; /* the |char_info| for the current character */
mp_number h, d; /* dimensions of the current character */
+ mp_number minus_inf_t; /* check the -inf of height and depth */
new_number(h);
new_number(d);
+ new_number(minus_inf_t);
+ number_clone(minus_inf_t, inf_t);
+ number_negate(minus_inf_t);
set_number_to_zero(p->width);
set_number_to_neg_inf(p->height);
set_number_to_neg_inf(p->depth);
@@ -34484,6 +34488,7 @@
@<Set the height and depth to zero if the bounding box is empty@>;
free_number (h);
free_number (d);
+ free_number (minus_inf_t);
}
@@ -34513,9 +34518,12 @@
overflow.
@<Set the height and depth to zero if the bounding box is empty@>=
-if (number_to_scaled(p->height) < -number_to_scaled(p->depth)) {
+if (number_equal(p->height,p->depth) && number_equal(p->height,minus_inf_t)) {
set_number_to_zero(p->height);
set_number_to_zero(p->depth);
+} else if (number_to_scaled(p->height) < -number_to_scaled(p->depth)) {
+ set_number_to_zero(p->height);
+ set_number_to_zero(p->depth);
}
@ The new primitives fontmapfile and fontmapline.
Modified: trunk/Build/source/texk/web2c/mplibdir/mpmathbinary.w
===================================================================
--- trunk/Build/source/texk/web2c/mplibdir/mpmathbinary.w 2020-08-20 23:53:46 UTC (rev 56146)
+++ trunk/Build/source/texk/web2c/mplibdir/mpmathbinary.w 2020-08-21 20:56:11 UTC (rev 56147)
@@ -216,7 +216,7 @@
@d equation_threshold 0.001
@d tfm_warn_threshold 0.0625
@d warning_limit pow(2.0,52.0) /* this is a large value that can just be expressed without loss of precision */
- at d epsilon "1E-52"
+ at d epsilon pow(2.0,-173.0) /* almost "1E-52" */
@d epsilonf pow(2.0,-52.0)
@d EL_GORDO "1E1000000" /* the largest value that \MP\ likes. */
@d one_third_EL_GORDO (EL_GORDO/3.0)
@@ -255,7 +255,7 @@
mpfr_set_si (fraction_one_plus_mpfr_t, (fraction_one+1), ROUNDING);
mpfr_set_si (angle_multiplier_mpfr_t, angle_multiplier, ROUNDING);
mpfr_set_str (PI_mpfr_t, PI_STRING, 10, ROUNDING);
- mpfr_set_str (epsilon_mpfr_t, epsilon, 10, ROUNDING);
+ mpfr_set_d(epsilon_mpfr_t, epsilon , ROUNDING);
mpfr_set_str (EL_GORDO_mpfr_t, EL_GORDO, 10, ROUNDING);
initialized = true;
}
Modified: trunk/Build/source/texk/web2c/mplibdir/mpmathdecimal.w
===================================================================
--- trunk/Build/source/texk/web2c/mplibdir/mpmathdecimal.w 2020-08-20 23:53:46 UTC (rev 56146)
+++ trunk/Build/source/texk/web2c/mplibdir/mpmathdecimal.w 2020-08-21 20:56:11 UTC (rev 56147)
@@ -346,7 +346,7 @@
@d p_over_v_threshold 0x80000 /* TODO */
@d equation_threshold 0.001
@d tfm_warn_threshold 0.0625
- at d epsilon "1E-52"
+ at d epsilon pow(2.0,-173.0) /* almost "1E-52" */
@d epsilonf pow(2.0,-52.0)
@d EL_GORDO "1E1000000" /* the largest value that \MP\ likes. */
@d warning_limit "1E1000000" /* this is a large value that can just be expressed without loss of precision */
@@ -394,7 +394,7 @@
decNumberFromInt32(&fraction_one_plus_decNumber, (fraction_one+1));
decNumberFromInt32(&angle_multiplier_decNumber, angle_multiplier);
decNumberFromString(&PI_decNumber, PI_STRING, &set);
- decNumberFromString(&epsilon_decNumber, epsilon, &set);
+ decNumberFromDouble(&epsilon_decNumber, epsilon);
decNumberFromString(&EL_GORDO_decNumber, EL_GORDO, &set);
factorials = (decNumber **)mp_xmalloc(mp,PRECALC_FACTORIALS_CACHESIZE,sizeof(decNumber *));
factorials[0] = (decNumber *)mp_xmalloc(mp,1,sizeof(decNumber));
More information about the tex-live-commits
mailing list.