version 1.43, 2019/11/12 10:52:05 |
version 1.44, 2019/12/24 10:26:38 |
|
|
* 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/spexpr.c,v 1.42 2018/03/29 07:50:06 ohara Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/io/spexpr.c,v 1.43 2019/11/12 10:52:05 kondoh Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "al.h" |
#include "al.h" |
Line 147 void sprintbf4itv(BF a) |
|
Line 147 void sprintbf4itv(BF a) |
|
int dprec; |
int dprec; |
char fbuf[BUFSIZ]; |
char fbuf[BUFSIZ]; |
char *s; |
char *s; |
dprec = a->body->_mpfr_prec*0.30103; |
|
dprec += 1; |
if ( !a ) { |
sprintf(fbuf,"%%.%dR%c",dprec,(double_output==1)?'f':(double_output==2)?'e':'g'); |
TAIL PUTS("0"); |
mpfr_asprintf(&s,fbuf,a->body); |
} else { |
TAIL PUTS(s); |
dprec = a->body->_mpfr_prec*0.30103; |
mpfr_free_str(s); |
dprec += 1; |
|
sprintf(fbuf,"%%.%dR%c",dprec,(double_output==1)?'f':(double_output==2)?'e':'g'); |
|
mpfr_asprintf(&s,fbuf,a->body); |
|
TAIL PUTS(s); |
|
mpfr_free_str(s); |
|
} |
} |
} |
#endif |
#endif |