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

Diff for /OpenXM_contrib2/asir2018/io/spexpr.c between version 1.3 and 1.4

version 1.3, 2019/11/12 10:53:23 version 1.4, 2019/12/24 10:26:39
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/asir2018/io/spexpr.c,v 1.2 2018/10/01 05:49:06 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2018/io/spexpr.c,v 1.3 2019/11/12 10:53:23 kondoh Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "al.h"  #include "al.h"
Line 148  void sprintbf4itv(BF a)
Line 148  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
   

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

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