version 1.9, 2000/12/22 10:03:30 |
version 1.10, 2001/03/09 01:44:10 |
|
|
* 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/pexpr.c,v 1.8 2000/12/16 06:16:10 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/io/pexpr.c,v 1.9 2000/12/22 10:03:30 saito Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "al.h" |
#include "al.h" |
Line 65 char DFORMAT[BUFSIZ]; |
|
Line 65 char DFORMAT[BUFSIZ]; |
|
int hex_output; |
int hex_output; |
int fortran_output; |
int fortran_output; |
int double_output; |
int double_output; |
|
int real_digit; |
|
|
#define TAIL |
#define TAIL |
#define PUTS(s) fputs(s,OUT) |
#define PUTS(s) fputs(s,OUT) |
Line 336 int printmode = PRINTF_G; |
|
Line 337 int printmode = PRINTF_G; |
|
void PRINTNUM(q) |
void PRINTNUM(q) |
Num q; |
Num q; |
{ |
{ |
|
char real_format[20]; |
|
|
if ( !q ) { |
if ( !q ) { |
PUTS("0"); |
PUTS("0"); |
return; |
return; |
|
|
case MID_PRINTF_G: |
case MID_PRINTF_G: |
#endif |
#endif |
default: |
default: |
TAIL PRINTF(OUT,"%g",BDY((Real)q)); |
if ( real_digit ) { |
|
sprintf(real_format, |
|
double_output?"%%.%df":"%%.%dg",real_digit); |
|
TAIL PRINTF(OUT,real_format,BDY((Real)q)); |
|
} else { |
|
TAIL PRINTF(OUT,double_output?"%f":"%g",BDY((Real)q)); |
|
} |
break; |
break; |
} |
} |
break; |
break; |