[BACK]Return to R.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / engine

Diff for /OpenXM_contrib2/asir2000/engine/R.c between version 1.2 and 1.5

version 1.2, 2000/08/21 08:31:27 version 1.5, 2005/08/24 06:28:39
Line 23 
Line 23 
  * shall be made on your publication or presentation in any form of the   * shall be made on your publication or presentation in any form of the
  * results obtained by use of the SOFTWARE.   * results obtained by use of the SOFTWARE.
  * (4) In the event that you modify the SOFTWARE, you shall notify FLL by   * (4) In the event that you modify the SOFTWARE, you shall notify FLL by
  * e-mail at risa-admin@flab.fujitsu.co.jp of the detailed specification   * e-mail at risa-admin@sec.flab.fujitsu.co.jp of the detailed specification
  * for such modification or the source code of the modified part of the   * for such modification or the source code of the modified part of the
  * SOFTWARE.   * SOFTWARE.
  *   *
Line 45 
Line 45 
  * 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/engine/R.c,v 1.1.1.1 1999/12/03 07:39:08 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/engine/R.c,v 1.4 2004/03/11 09:52:56 noro Exp $
 */  */
 #include "ca.h"  #include "ca.h"
   
Line 191  Obj a,q,*c;
Line 191  Obj a,q,*c;
                 *c = (Obj)ONE;                  *c = (Obj)ONE;
         else if ( !a )          else if ( !a )
                 *c = 0;                  *c = 0;
         else if ( !RAT(a) )  
                 pwrp(vl,(P)a,(Q)q,(P *)c);  
         else if ( !NUM(q) || !RATN(q) || !INT(q) )          else if ( !NUM(q) || !RATN(q) || !INT(q) )
                 notdef(vl,a,q,c);                  notdef(vl,a,q,c);
         else {          else if ( !RAT(a) && (SGN((Q)q) > 0) ) {
                           pwrp(vl,(P)a,(Q)q,&t); *c = (Obj)t;
           } else {
                   if ( !RAT(a) ) {
                           PTOR((P)a,r); a = (Obj)r;
                   }
                 if ( SGN((Q)q) < 0 ) {                  if ( SGN((Q)q) < 0 ) {
                         chsgnq((Q)q,&q1); pwrp(vl,DN((R)a),q1,&t); pwrp(vl,NM((R)a),q1,&s);                          chsgnq((Q)q,&q1); pwrp(vl,DN((R)a),q1,&t); pwrp(vl,NM((R)a),q1,&s);
                 } else {                  } else {
Line 240  Obj a,b;
Line 243  Obj a,b;
                         t = compp(vl,DN((R)a),DN((R)b));                          t = compp(vl,DN((R)a),DN((R)b));
                 return t;                  return t;
         }          }
   }
   
   int equalr(vl,a,b)
   VL vl;
   Obj a,b;
   {
           if ( !a )
                   return b ? 0 : 1;
           else if ( !b )
                   return 0;
           else if ( !RAT(a) )
                   return !RAT(b) ? equalp(vl,(P)a,(P)b) : 0;
           else if ( !RAT(b) )
                   return 0;
           else
                   return equalp(vl,NM((R)a),NM((R)b)) && equalp(vl,DN((R)a),DN((R)b));
 }  }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.5

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