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

Diff for /OpenXM_contrib2/asir2018/builtin/itvnum.c between version 1.3 and 1.4

version 1.3, 2019/06/04 07:11:23 version 1.4, 2019/10/17 03:03:12
Line 1 
Line 1 
 /*  /*
  * $OpenXM: OpenXM_contrib2/asir2018/builtin/itvnum.c,v 1.2 2018/09/28 08:20:27 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2018/builtin/itvnum.c,v 1.3 2019/06/04 07:11:23 kondoh Exp $
  */   */
   
 #include "ca.h"  #include "ca.h"
Line 86  extern int mpfr_roundmode;
Line 86  extern int mpfr_roundmode;
 static void  static void
 Pifcheck(NODE arg, Obj *rp)  Pifcheck(NODE arg, Obj *rp)
 {  {
   Q m2,p2,s_id;    Z m2,p2,s_id;
   NODE defrange;    NODE defrange;
   LIST xrange,yrange,range[2],list,geom;    LIST xrange,yrange,range[2],list,geom;
   VL vl,vl0;    VL vl,vl0;
Line 101  Pifcheck(NODE arg, Obj *rp)
Line 101  Pifcheck(NODE arg, Obj *rp)
   MAT m;    MAT m;
   pointer **mb;    pointer **mb;
   double **tabe, *px, *px1, *px2;    double **tabe, *px, *px1, *px2;
   Q one;    Z one;
   int width, height, ix, iy;    int width, height, ix, iy;
   int id;    int id;
   
   STOQ(-2,m2); STOQ(2,p2);    STOZ(-2,m2); STOZ(2,p2);
   STOQ(1,one);    STOZ(1,one);
   MKNODE(n,p2,0); MKNODE(defrange,m2,n);    MKNODE(n,p2,0); MKNODE(defrange,m2,n);
   poly = 0; vl = 0; geom = 0; ri = 0;    poly = 0; vl = 0; geom = 0; ri = 0;
   v[0] = v[1] = 0;    v[0] = v[1] = 0;
Line 176  Pifcheck(NODE arg, Obj *rp)
Line 176  Pifcheck(NODE arg, Obj *rp)
     can->width = 300;      can->width = 300;
     can->height = 300;      can->height = 300;
   } else {    } else {
     can->width = QTOS((Q)BDY(BDY(geom)));      can->width = ZTOS((Z)BDY(BDY(geom)));
     can->height = QTOS((Q)BDY(NEXT(BDY(geom))));      can->height = ZTOS((Z)BDY(NEXT(BDY(geom))));
     width = can->width;      width = can->width;
     height = can->height;      height = can->height;
   }    }
Line 249  void ccalc(double **tab,struct canvas *can,int nox)
Line 249  void ccalc(double **tab,struct canvas *can,int nox)
 static void  static void
 Pitvversion(NODE arg, Q *rp)  Pitvversion(NODE arg, Q *rp)
 {  {
   STOQ(INT_ASIR_VERSION, *rp);          Z r;
     STOZ(INT_ASIR_VERSION, r);
           *rp = (Q)r;
 }  }
   
 extern int  bigfloat;  extern int  bigfloat;
Line 608  Obj *rp;
Line 610  Obj *rp;
 }  }
   
 static void  static void
 Pinitv(arg,rp)  Pinitv(NODE arg, Obj *rp)
 NODE arg;  
 Obj *rp;  
 {  {
   int  s;    int  s;
   Q  q;    Z  q;
   
   asir_assert(ARG0(arg),O_N,"intval");    asir_assert(ARG0(arg),O_N,"intval");
   asir_assert(ARG1(arg),O_N,"intval");    asir_assert(ARG1(arg),O_N,"intval");
Line 634  Obj *rp;
Line 634  Obj *rp;
   } else {    } else {
     s = ! compnum(0,(Num)ARG0(arg),(Num)ARG1(arg));      s = ! compnum(0,(Num)ARG0(arg),(Num)ARG1(arg));
   }    }
   STOQ(s,q);    STOZ(s,q);
   *rp = (Obj)q;    *rp = (Obj)q;
 }  }
   
Line 655  Obj *rp;
Line 655  Obj *rp;
 static void  static void
 PzeroRewriteMode(NODE arg, Obj *rp)  PzeroRewriteMode(NODE arg, Obj *rp)
 {  {
   Q  a, r;    Q  a;
     Z r;
   
   STOQ(zerorewrite,r);    STOZ(zerorewrite,r);
   *rp = (Obj)r;    *rp = (Obj)r;
   
   if (arg) {    if (arg) {
Line 673  PzeroRewriteMode(NODE arg, Obj *rp)
Line 674  PzeroRewriteMode(NODE arg, Obj *rp)
 static void  static void
 PzeroRewriteCountClear(NODE arg, Obj *rp)  PzeroRewriteCountClear(NODE arg, Obj *rp)
 {  {
   Q  a, r;    Q  a;
     Z  r;
   
   STOQ(zerorewriteCount,r);    STOZ(zerorewriteCount,r);
   *rp = (Obj)r;    *rp = (Obj)r;
   
   if (arg) {    if (arg) {
Line 689  PzeroRewriteCountClear(NODE arg, Obj *rp)
Line 691  PzeroRewriteCountClear(NODE arg, Obj *rp)
 static void  static void
 PzeroRewriteCount(NODE arg, Obj *rp)  PzeroRewriteCount(NODE arg, Obj *rp)
 {  {
   Q  r;    Z  r;
   
   STOQ(zerorewriteCount,r);    STOZ(zerorewriteCount,r);
   *rp = (Obj)r;    *rp = (Obj)r;
 }  }
   
Line 724  static void
Line 726  static void
 Pprintmode(NODE arg, Obj *rp)  Pprintmode(NODE arg, Obj *rp)
 {  {
   int  l;    int  l;
   Q  a, r;    Z  a, r;
   
   a = (Q)ARG0(arg);    a = (Z)ARG0(arg);
   if(!a||(NUM(a)&&INT(a))){    if(!a||(NUM(a)&&INT(a))){
     l=QTOS(a);      l=ZTOS(a);
     if ( l < 0 ) l = 0;      if ( l < 0 ) l = 0;
 #if defined(INTERVAL)  #if defined(INTERVAL)
     else if ( l > MID_PRINTF_E ) l = 0;      else if ( l > MID_PRINTF_E ) l = 0;
 #else  #else
     else if ( l > PRINTF_E ) l = 0;      else if ( l > PRINTF_E ) l = 0;
 #endif  #endif
     STOQ(printmode,r);      STOZ(printmode,r);
     *rp = (Obj)r;      *rp = (Obj)r;
     printmode = l;      printmode = l;
     pprintmode();      pprintmode();

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

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