[BACK]Return to cpexpr.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / io

Diff for /OpenXM_contrib2/asir2000/io/cpexpr.c between version 1.26 and 1.27

version 1.26, 2006/08/27 22:17:28 version 1.27, 2015/08/04 06:20:45
Line 44 
Line 44 
  * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY   * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY
  * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,   * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
  * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.   * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
  * $OpenXM: OpenXM_contrib2/asir2000/io/cpexpr.c,v 1.25 2005/11/16 23:42:54 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/io/cpexpr.c,v 1.26 2006/08/27 22:17:28 noro Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "parse.h"  #include "parse.h"
 #include "al.h"  #include "al.h"
 #include "base.h"  #include "base.h"
 #if PARI  
 #include "genpari.h"  
 #endif  
   
 #ifndef CPRINT  #ifndef CPRINT
 #define CPRINT  #define CPRINT
Line 117  int estimate_length(VL vl,pointer p)
Line 114  int estimate_length(VL vl,pointer p)
         return total_length;          return total_length;
 }  }
   
 #if defined(PARI)  
 void PRINTBF(BF a)  void PRINTBF(BF a)
 {  {
         char *str;          char *str;
         char *GENtostr0();          int dprec;
         void myoutbrute();          char fbuf[BUFSIZ];
   
         if ( double_output ) {          dprec = a->body->_mpfr_prec*0.30103;
                 str = GENtostr0(a->body,myoutbrute);          sprintf(fbuf,"%%.%dR%c",dprec,double_output?'f':'g');
         } else {          mpfr_asprintf(&str,fbuf,a->body);
                 str = GENtostr(a->body);  
         }  
         total_length += strlen(str);          total_length += strlen(str);
         free(str);          mpfr_free_str(str);
 }  }
 #endif  
   
 void PRINTNUM(Num q)  void PRINTNUM(Num q)
 {  {
Line 162  void PRINTNUM(Num q)
Line 155  void PRINTNUM(Num q)
                 case N_A:                  case N_A:
                         PUTS("("); PRINTR(ALG,(R)BDY((Alg)q)); PUTS(")");                          PUTS("("); PRINTR(ALG,(R)BDY((Alg)q)); PUTS(")");
                         break;                          break;
 #if defined(PARI)  
                 case N_B:                  case N_B:
                         PRINTBF((BF)q); break;                          PRINTBF((BF)q); break;
 #endif  
                 case N_C:                  case N_C:
                         PRINTCPLX((C)q); break;                          PRINTCPLX((C)q); break;
                 case N_M:                  case N_M:

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>