=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/io/pexpr.c,v retrieving revision 1.37 retrieving revision 1.40 diff -u -p -r1.37 -r1.40 --- OpenXM_contrib2/asir2000/io/pexpr.c 2004/07/13 07:59:54 1.37 +++ OpenXM_contrib2/asir2000/io/pexpr.c 2015/08/04 06:20:45 1.40 @@ -44,7 +44,7 @@ * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. - * $OpenXM: OpenXM_contrib2/asir2000/io/pexpr.c,v 1.36 2004/05/14 06:02:54 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/io/pexpr.c,v 1.39 2005/11/16 23:42:54 noro Exp $ */ #include "ca.h" #include "al.h" @@ -56,10 +56,6 @@ #define FPRINT #endif -#if defined(PARI) -#include "genpari.h" -#endif - extern int outputstyle; FILE *asir_out; @@ -72,7 +68,6 @@ int real_digit; int real_binary; int print_quote; int hideargs; -extern int asir_texmacs; extern FUNC user_print_function; #if 0 int printmode = PRINTF_E; @@ -108,6 +103,7 @@ int printmode = PRINTF_G; #define PRINTBYTEARRAY printbytearray #define PRINTQUOTE printquote #define PRINTQUOTEARG printquotearg +#define PRINTNBP printnbp #define PRINTERR printerr #define PRINTLF printlf #define PRINTLOP printlop @@ -153,11 +149,13 @@ P p; return (mmono(COEF(DC(p)))); } -#if defined(PARI) -void printbf(a) -BF a; +void printbf(BF a) { - sor(a->body,double_output ? 'f' : 'g',-1,0); + int dprec; + char fbuf[BUFSIZ]; + dprec = (a->body->_mpfr_prec)*0.30103; + if ( !dprec ) dprec = 1; + sprintf(fbuf,"%%.%dR%c",dprec,double_output?'f':'g'); + mpfr_fprintf(OUT,fbuf,a->body); } -#endif