summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/mplibdir/mpmath.w
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/mplibdir/mpmath.w')
-rw-r--r--Build/source/texk/web2c/mplibdir/mpmath.w13
1 files changed, 12 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/mplibdir/mpmath.w b/Build/source/texk/web2c/mplibdir/mpmath.w
index 4eed95ce876..9b6bcb6995a 100644
--- a/Build/source/texk/web2c/mplibdir/mpmath.w
+++ b/Build/source/texk/web2c/mplibdir/mpmath.w
@@ -1,4 +1,4 @@
-% $Id: mpmath.w 1892 2013-03-22 10:21:05Z taco $
+% $Id: mpmath.w 1959 2014-03-11 11:19:43Z taco $
%
% This file is part of MetaPost;
% the MetaPost program is in the public domain.
@@ -102,6 +102,7 @@ static void mp_number_take_scaled (MP mp, mp_number *r, mp_number p, mp_number q
static void mp_new_number (MP mp, mp_number *n, mp_number_type t) ;
static void mp_free_number (MP mp, mp_number *n) ;
static void mp_free_scaled_math (MP mp);
+static void mp_scaled_set_precision (MP mp);
@ And these are the ones that {\it are} used elsewhere
@@ -130,6 +131,12 @@ void * mp_initialize_scaled_math (MP mp) {
/* alloc */
math->allocate = mp_new_number;
math->free = mp_free_number;
+ mp_new_number (mp, &math->precision_default, mp_scaled_type);
+ math->precision_default.data.val = unity * 10;
+ mp_new_number (mp, &math->precision_max, mp_scaled_type);
+ math->precision_max.data.val = unity * 10;
+ mp_new_number (mp, &math->precision_min, mp_scaled_type);
+ math->precision_min.data.val = unity * 10;
/* here are the constants for |scaled| objects */
mp_new_number (mp, &math->epsilon_t, mp_scaled_type);
math->epsilon_t.data.val = 1;
@@ -264,9 +271,13 @@ void * mp_initialize_scaled_math (MP mp) {
math->scan_numeric = mp_scan_numeric_token;
math->scan_fractional = mp_scan_fractional_token;
math->free_math = mp_free_scaled_math;
+ math->set_precision = mp_scaled_set_precision;
return (void *)math;
}
+void mp_scaled_set_precision (MP mp) {
+}
+
void mp_free_scaled_math (MP mp) {
free_number (((math_data *)mp->math)->epsilon_t);
free_number (((math_data *)mp->math)->inf_t);