diff options
author | john haque <j.eh@mchsi.com> | 2012-03-19 04:30:00 -0500 |
---|---|---|
committer | john haque <j.eh@mchsi.com> | 2012-03-19 04:30:00 -0500 |
commit | 40645cb3cb155eb59dd745af4ae0e06e729c8eb1 (patch) | |
tree | 1c24a9a6cb2ac9acc985b3f4667c7139c10c4525 /profile.c | |
parent | b5431a4825e325c61f4043e4d25e47d7891c228c (diff) | |
download | egawk-40645cb3cb155eb59dd745af4ae0e06e729c8eb1.tar.gz egawk-40645cb3cb155eb59dd745af4ae0e06e729c8eb1.tar.bz2 egawk-40645cb3cb155eb59dd745af4ae0e06e729c8eb1.zip |
Add arbitrary-precision arithmetic on integers.
Diffstat (limited to 'profile.c')
-rw-r--r-- | profile.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1209,8 +1209,10 @@ pp_number(NODE *n) emalloc(str, char *, PP_PRECISION + 10, "pp_number"); #ifdef HAVE_MPFR - if (n->flags & MPFN) + if (is_mpg_float(n)) mpfr_sprintf(str, "%0.*R*g", PP_PRECISION, RND_MODE, n->mpg_numbr); + else if (is_mpg_integer(n)) + mpfr_sprintf(str, "%Zd", n->mpg_i); else #endif sprintf(str, "%0.*g", PP_PRECISION, n->numbr); |