cmp.c File Reference

#include "stack-c.h"
#include "Os_specific.h"

Include dependency graph for cmp.c:

Go to the source code of this file.

Defines

#define less   59
#define great   60
#define equal   50
#define less_equal   109
#define less_great   119
#define great_equal   110

Functions

static void idcmp_equal (double x[], double y[], int *n, int res[])
static void idcmp_lessgreat (double x[], double y[], int *n, int res[])
static void idcmp_less (double x[], double y[], int *n, int res[])
static void idcmp_great (double x[], double y[], int *n, int res[])
static void idcmp_lessequal (double x[], double y[], int *n, int res[])
static void idcmp_greatequal (double x[], double y[], int *n, int res[])
int C2F() idcmp (double x[], double y[], int *n, int res[], int *op)


Define Documentation

#define equal   50

Definition at line 14 of file cmp.c.

#define great   60

Definition at line 13 of file cmp.c.

#define great_equal   110

Definition at line 20 of file cmp.c.

#define less   59

Definition at line 12 of file cmp.c.

#define less_equal   109

Definition at line 16 of file cmp.c.

#define less_great   119

Definition at line 18 of file cmp.c.


Function Documentation

int C2F() idcmp ( double  x[],
double  y[],
int n,
int  res[],
int op 
)

static void idcmp_equal ( double  x[],
double  y[],
int n,
int  res[] 
) [static]

Definition at line 49 of file cmp.c.

References C2F, i, and isanan().

00050 {
00051   int i; 
00052   for (i=0; i < *n; i++) 
00053     {
00054 #ifdef NAN_CHECK 
00055       if ( C2F(isanan)(&x[i])== 1 || C2F(isanan)(&y[i])== 1 ) 
00056         res[i]= 0; 
00057       else 
00058         res[i]= x[i]== y[i]; 
00059 #else 
00060     res[i]= x[i]== y[i]; 
00061 #endif 
00062     }
00063 }

Here is the call graph for this function:

static void idcmp_great ( double  x[],
double  y[],
int n,
int  res[] 
) [static]

Definition at line 98 of file cmp.c.

References C2F, i, and isanan().

00099 {
00100   int i; 
00101   for (i=0; i < *n; i++) 
00102     {
00103 #ifdef NAN_CHECK 
00104       if ( C2F(isanan)(&x[i])== 1 || C2F(isanan)(&y[i])== 1 ) 
00105         res[i]= 0; 
00106       else 
00107         res[i]= x[i] >  y[i]; 
00108 #else 
00109       res[i]= x[i] >  y[i]; 
00110 #endif 
00111     }
00112 }

Here is the call graph for this function:

static void idcmp_greatequal ( double  x[],
double  y[],
int n,
int  res[] 
) [static]

Definition at line 132 of file cmp.c.

References C2F, i, and isanan().

00133 {
00134   int i; 
00135   for (i=0; i < *n; i++) 
00136     {
00137 #ifdef NAN_CHECK 
00138       if ( C2F(isanan)(&x[i])== 1 || C2F(isanan)(&y[i])== 1 ) 
00139         res[i]= 0; 
00140       else 
00141         res[i]= x[i] >=  y[i]; 
00142 #else 
00143       res[i]= x[i] >=  y[i]; 
00144 #endif 
00145     }
00146 }

Here is the call graph for this function:

static void idcmp_less ( double  x[],
double  y[],
int n,
int  res[] 
) [static]

Definition at line 81 of file cmp.c.

References C2F, i, and isanan().

00082 {
00083   int i; 
00084   for (i=0; i < *n; i++) 
00085     {
00086 #ifdef NAN_CHECK 
00087       if ( C2F(isanan)(&x[i])== 1 || C2F(isanan)(&y[i])== 1 ) 
00088         res[i]= 0; 
00089       else 
00090         res[i]= x[i] <  y[i]; 
00091 #else 
00092       res[i]= x[i] <  y[i]; 
00093 #endif 
00094     }
00095 }

Here is the call graph for this function:

static void idcmp_lessequal ( double  x[],
double  y[],
int n,
int  res[] 
) [static]

Definition at line 115 of file cmp.c.

References C2F, i, and isanan().

00116 {
00117   int i; 
00118   for (i=0; i < *n; i++) 
00119     {
00120 #ifdef NAN_CHECK 
00121       if ( C2F(isanan)(&x[i])== 1 || C2F(isanan)(&y[i])== 1 ) 
00122         res[i]= 0; 
00123       else 
00124         res[i]= x[i] <=  y[i]; 
00125 #else 
00126       res[i]= x[i] <=  y[i]; 
00127 #endif 
00128     }
00129 }

Here is the call graph for this function:

static void idcmp_lessgreat ( double  x[],
double  y[],
int n,
int  res[] 
) [static]

Definition at line 65 of file cmp.c.

References C2F, i, and isanan().

00066 {
00067   int i; 
00068   for (i=0; i < *n; i++) 
00069     {
00070 #ifdef NAN_CHECK 
00071       if ( C2F(isanan)(&x[i])== 1 || C2F(isanan)(&y[i])== 1 ) 
00072         res[i]= 1; 
00073       else 
00074         res[i]= x[i] != y[i]; 
00075 #else 
00076       res[i]= x[i] != y[i]; 
00077 #endif 
00078     }
00079 }

Here is the call graph for this function:


Generated on Sun Mar 4 15:18:19 2007 for Scilab [trunk] by  doxygen 1.5.1