version 1.13, 2001/10/09 01:36:20 |
version 1.16, 2003/12/25 02:40:24 |
|
|
* 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.12 2001/09/03 07:01:08 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/io/cpexpr.c,v 1.15 2003/02/14 22:29:15 ohara 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 |
|
|
extern int hex_output,fortran_output,double_output,real_digit; |
extern int hex_output,fortran_output,double_output,real_digit; |
|
|
Line 127 int estimate_length(VL vl,pointer p) |
|
Line 130 int estimate_length(VL vl,pointer p) |
|
return total_length; |
return total_length; |
} |
} |
|
|
#if PARI |
#if defined(PARI) |
void PRINTBF(BF a) |
void PRINTBF(BF a) |
{ |
{ |
char *str; |
char *str; |
char *GENtostr(); |
|
char *GENtostr0(); |
char *GENtostr0(); |
void myoutbrute(); |
void myoutbrute(); |
|
|
Line 228 void PRINTNUM(Num q) |
|
Line 230 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 PARI |
#if defined(PARI) |
case N_B: |
case N_B: |
PRINTBF((BF)q); break; |
PRINTBF((BF)q); break; |
#endif |
#endif |
Line 338 void PRINTV(VL vl,V v) |
|
Line 340 void PRINTV(VL vl,V v) |
|
else if ( (vid)v->attr == V_PF ) { |
else if ( (vid)v->attr == V_PF ) { |
pf = ((PFINS)v->priv)->pf; ad = ((PFINS)v->priv)->ad; |
pf = ((PFINS)v->priv)->pf; ad = ((PFINS)v->priv)->ad; |
if ( !strcmp(NAME(pf),"pow") ) { |
if ( !strcmp(NAME(pf),"pow") ) { |
PUTS("("); PRINTR(vl,(R)ad[0].arg); PUTS(")"); PRINTHAT; PUTS("("); |
PUTS("(("); PRINTR(vl,(R)ad[0].arg); PUTS(")"); PRINTHAT; PUTS("("); |
PRINTR(vl,(R)ad[1].arg); PUTS(")"); |
PRINTR(vl,(R)ad[1].arg); PUTS("))"); |
} else if ( !pf->argc ) |
} else if ( !pf->argc ) |
PUTS(NAME(pf)); |
PUTS(NAME(pf)); |
else { |
else { |