version 1.21, 2018/03/29 01:32:53 |
version 1.23, 2019/11/12 10:52:05 |
|
|
/* $OpenXM: OpenXM_contrib2/asir2000/io/pexpr_body.c,v 1.20 2017/08/31 02:36:21 noro Exp $ */ |
/* $OpenXM: OpenXM_contrib2/asir2000/io/pexpr_body.c,v 1.22 2018/03/29 07:50:06 ohara Exp $ */ |
|
|
#define PRINTHAT (fortran_output?PUTS("**"):PUTS("^")) |
#define PRINTHAT (fortran_output?PUTS("**"):PUTS("^")) |
|
|
|
|
void PRINTFNODE(); |
void PRINTFNODE(); |
void PRINTBF(); |
void PRINTBF(); |
void PRINTDAlg(); |
void PRINTDAlg(); |
|
#if defined(INTERVAL) |
|
void PRINTBF4ITV(); |
|
#endif |
|
|
void PRINTEXPR(vl,p) |
void PRINTEXPR(vl,p) |
VL vl; |
VL vl; |
|
|
} |
} |
} |
} |
} else if ( real_digit ) { |
} else if ( real_digit ) { |
sprintf(real_format, |
sprintf(real_format,"%%.%d%c", |
double_output?"%%.%df":"%%.%dg",real_digit); |
real_digit,(double_output==1)?'f':(double_output==2)?'e':'g'); |
TAIL PRINTF(OUT,real_format,BDY((Real)q)); |
TAIL PRINTF(OUT,real_format,BDY((Real)q)); |
} else { |
} else { |
TAIL PRINTF(OUT,double_output?"%f":"%g",BDY((Real)q)); |
TAIL PRINTF(OUT,(double_output==1)?"%f":(double_output==2)?"%e":"%g",BDY((Real)q)); |
} |
} |
break; |
break; |
} |
} |
|
|
PRINTBF((BF)q); break; |
PRINTBF((BF)q); break; |
#if defined(INTERVAL) |
#if defined(INTERVAL) |
case N_IP: |
case N_IP: |
|
PUTS("["); |
|
PRINTNUM(INF((Itv)q)); |
|
PUTS(","); |
|
PRINTNUM(SUP((Itv)q)); |
|
PUTS("]"); |
|
break; |
case N_IntervalBigFloat: |
case N_IntervalBigFloat: |
switch ( outputstyle ) { |
switch ( outputstyle ) { |
case 1: |
case 1: |
PUTS("intval("); |
PUTS("intvalbf("); |
PRINTNUM(INF((Itv)q)); |
PRINTBF4ITV(INF((Itv)q)); |
PUTS(","); |
PUTS(","); |
PRINTNUM(SUP((Itv)q)); |
PRINTBF4ITV(SUP((Itv)q)); |
PUTS(")"); |
PUTS(")"); |
break; |
break; |
case 0: |
case 0: |
default: |
default: |
PUTS("["); |
PUTS("["); |
PRINTNUM(INF((Itv)q)); |
PRINTBF4ITV(INF((Itv)q)); |
PUTS(","); |
PUTS(","); |
PRINTNUM(SUP((Itv)q)); |
PRINTBF4ITV(SUP((Itv)q)); |
PUTS("]"); |
PUTS("]"); |
break; |
break; |
} |
} |
|
|
case PRINTF_E: |
case PRINTF_E: |
switch ( outputstyle ) { |
switch ( outputstyle ) { |
case 1: |
case 1: |
TAIL PRINTF(OUT, "intval(%.16e,%.16e)", |
TAIL PRINTF(OUT, "intvald(%.16e,%.16e)", |
INF((IntervalDouble)q),SUP((IntervalDouble)q)); |
INF((IntervalDouble)q),SUP((IntervalDouble)q)); |
break; |
break; |
case 0: |
case 0: |