version 1.1, 2003/12/02 03:24:24 |
version 1.6, 2007/01/30 00:38:25 |
|
|
|
/* $OpenXM$ */ |
|
|
|
#undef INTERVAL |
#define INTERVAL |
#define INTERVAL |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 31 void Padd_pinf(NODE arg,Real *rp) |
|
Line 34 void Padd_pinf(NODE arg,Real *rp) |
|
*rp = b; |
*rp = b; |
else if ( !b ) |
else if ( !b ) |
*rp = a; |
*rp = a; |
|
else if ( NID(a) != N_R || NID(b) != N_R ) |
|
error("add_pinf : invalid argument"); |
else { |
else { |
FPPLUSINF |
FPPLUSINF |
c = BDY(a)+BDY(b); |
c = BDY(a)+BDY(b); |
Line 51 void Padd_minf(NODE arg,Real *rp) |
|
Line 56 void Padd_minf(NODE arg,Real *rp) |
|
*rp = b; |
*rp = b; |
else if ( !b ) |
else if ( !b ) |
*rp = a; |
*rp = a; |
|
else if ( NID(a) != N_R || NID(b) != N_R ) |
|
error("add_pinf : invalid argument"); |
else { |
else { |
FPMINUSINF |
FPMINUSINF |
c = BDY(a)+BDY(b); |
c = BDY(a)+BDY(b); |
Line 77 void Psub_pinf(NODE arg,Real *rp) |
|
Line 84 void Psub_pinf(NODE arg,Real *rp) |
|
} |
} |
} else if ( !b ) |
} else if ( !b ) |
*rp = a; |
*rp = a; |
|
else if ( NID(a) != N_R || NID(b) != N_R ) |
|
error("sub_pinf : invalid argument"); |
else { |
else { |
FPPLUSINF |
FPPLUSINF |
c = BDY(a)-BDY(b); |
c = BDY(a)-BDY(b); |
Line 103 void Psub_minf(NODE arg,Real *rp) |
|
Line 112 void Psub_minf(NODE arg,Real *rp) |
|
} |
} |
} else if ( !b ) |
} else if ( !b ) |
*rp = a; |
*rp = a; |
|
else if ( NID(a) != N_R || NID(b) != N_R ) |
|
error("sub_minf : invalid argument"); |
else { |
else { |
FPMINUSINF |
FPMINUSINF |
c = BDY(a)-BDY(b); |
c = BDY(a)-BDY(b); |
Line 121 void Pmul_pinf(NODE arg,Real *rp) |
|
Line 132 void Pmul_pinf(NODE arg,Real *rp) |
|
b = (Real)ARG1(arg); |
b = (Real)ARG1(arg); |
if ( !a || !b ) |
if ( !a || !b ) |
*rp = 0; |
*rp = 0; |
|
else if ( NID(a) != N_R || NID(b) != N_R ) |
|
error("mul_pinf : invalid argument"); |
else { |
else { |
FPPLUSINF |
FPPLUSINF |
c = BDY(a)*BDY(b); |
c = BDY(a)*BDY(b); |
Line 139 void Pmul_minf(NODE arg,Real *rp) |
|
Line 152 void Pmul_minf(NODE arg,Real *rp) |
|
b = (Real)ARG1(arg); |
b = (Real)ARG1(arg); |
if ( !a || !b ) |
if ( !a || !b ) |
*rp = 0; |
*rp = 0; |
|
else if ( NID(a) != N_R || NID(b) != N_R ) |
|
error("mul_minf : invalid argument"); |
else { |
else { |
FPMINUSINF |
FPMINUSINF |
c = BDY(a)*BDY(b); |
c = BDY(a)*BDY(b); |
Line 159 void Pdiv_pinf(NODE arg,Real *rp) |
|
Line 174 void Pdiv_pinf(NODE arg,Real *rp) |
|
error("div_pinf : division by 0"); |
error("div_pinf : division by 0"); |
else if ( !a ) |
else if ( !a ) |
*rp = 0; |
*rp = 0; |
|
else if ( NID(a) != N_R || NID(b) != N_R ) |
|
error("div_pinf : invalid argument"); |
else { |
else { |
FPPLUSINF |
FPPLUSINF |
c = BDY(a)/BDY(b); |
c = BDY(a)/BDY(b); |
Line 176 void Pdiv_minf(NODE arg,Real *rp) |
|
Line 193 void Pdiv_minf(NODE arg,Real *rp) |
|
a = (Real)ARG0(arg); |
a = (Real)ARG0(arg); |
b = (Real)ARG1(arg); |
b = (Real)ARG1(arg); |
if ( !b ) |
if ( !b ) |
error("div_pinf : division by 0"); |
error("div_minf : division by 0"); |
else if ( !a ) |
else if ( !a ) |
*rp = 0; |
*rp = 0; |
|
else if ( NID(a) != N_R || NID(b) != N_R ) |
|
error("div_minf : invalid argument"); |
else { |
else { |
FPMINUSINF |
FPMINUSINF |
c = BDY(a)/BDY(b); |
c = BDY(a)/BDY(b); |