IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 2, 2004, 9:43:23 AM (22 years ago)
Author:
desonia
Message:

adjusted output precision to allow tests to pass on x86_64, etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/dataManip/tst_psMatrixVectorArithmetic02.c

    r1134 r1365  
    1010 *  @author  Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.1 $  $Name: not supported by cvs2svn $
    13  *  @date  $Date: 2004-06-30 00:18:49 $
     12 *  @version $Revision: 1.2 $  $Name: not supported by cvs2svn $
     13 *  @date  $Date: 2004-08-02 19:43:23 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2525#define PRINT_SCALAR(SCALAR,TYPE)                                                                            \
    2626if(PS_IS_PSELEMTYPE_COMPLEX(SCALAR->type.type)) {                                                            \
    27     printf("%f+%fi ", creal(SCALAR->data.TYPE), cimag(SCALAR->data.TYPE));                                   \
    28 } else if(PS_IS_PSELEMTYPE_INT(SCALAR->type.type)) {                                                         \
    29     printf("%d", (int)SCALAR->data.TYPE);                                                                    \
    30 } else {                                                                                                     \
    31     printf("%f", (double)SCALAR->data.TYPE);                                                                 \
    32 }                                                                                                            \
     27        printf("%.2f%f+.2i ", creal(SCALAR->data.TYPE), cimag(SCALAR->data.TYPE));                                   \
     28    } else if(PS_IS_PSELEMTYPE_INT(SCALAR->type.type)) {                                                         \
     29        printf("%d", (int)SCALAR->data.TYPE);                                                                    \
     30    } else {                                                                                                     \
     31        printf("%.2f", (double)SCALAR->data.TYPE);                                                                 \
     32    }                                                                                                            \
    3333printf("\n\n");
    3434
     
    3636#define PRINT_VECTOR(VECTOR,TYPE)                                                                            \
    3737for(int i=0; i<VECTOR->n; i++) {                                                                             \
    38     if(PS_IS_PSELEMTYPE_COMPLEX(VECTOR->type.type)) {                                                        \
    39         printf("%f+%fi\n", creal(VECTOR->data.TYPE[i]), cimag(VECTOR->data.TYPE[i]));                        \
    40     } else if(PS_IS_PSELEMTYPE_INT(VECTOR->type.type)) {                                                     \
    41         printf("%d\n", (int)VECTOR->data.TYPE[i]);                                                           \
    42     } else {                                                                                                 \
    43         printf("%f\n", (double)VECTOR->data.TYPE[i]);                                                        \
    44     }                                                                                                        \
    45 }                                                                                                            \
     38        if(PS_IS_PSELEMTYPE_COMPLEX(VECTOR->type.type)) {                                                        \
     39                printf("%.2f%+.2fi\n", creal(VECTOR->data.TYPE[i]), cimag(VECTOR->data.TYPE[i]));                        \
     40            } else if(PS_IS_PSELEMTYPE_INT(VECTOR->type.type)) {                                                     \
     41                printf("%d\n", (int)VECTOR->data.TYPE[i]);                                                           \
     42            } else {                                                                                                 \
     43                printf("%.2f\n", (double)VECTOR->data.TYPE[i]);                                                        \
     44            }                                                                                                        \
     45    }                                                                                                            \
    4646printf("\n");
    4747
     
    4949#define PRINT_MATRIX(IMAGE,TYPE)                                                                             \
    5050for(int i=IMAGE->numRows-1; i>-1; i--) {                                                                     \
    51     for(int j=0; j<IMAGE->numCols; j++) {                                                                    \
    52         if(PS_IS_PSELEMTYPE_COMPLEX(IMAGE->type.type)) {                                                     \
    53             printf("%f+%fi ", creal(IMAGE->data.TYPE[i][j]), cimag(IMAGE->data.TYPE[i][j]));                 \
    54         } else if(PS_IS_PSELEMTYPE_INT(IMAGE->type.type)) {                                                  \
    55             printf("%d ", (int)IMAGE->data.TYPE[i][j]);                                                      \
    56         } else {                                                                                             \
    57             printf("%f ", (double)IMAGE->data.TYPE[i][j]);                                                   \
    58         }                                                                                                    \
    59     }                                                                                                        \
    60     printf("\n");                                                                                            \
    61 }                                                                                                            \
     51        for(int j=0; j<IMAGE->numCols; j++) {                                                                    \
     52                if(PS_IS_PSELEMTYPE_COMPLEX(IMAGE->type.type)) {                                                     \
     53                        printf("%.2f%+.2fi ", creal(IMAGE->data.TYPE[i][j]), cimag(IMAGE->data.TYPE[i][j]));                 \
     54                    } else if(PS_IS_PSELEMTYPE_INT(IMAGE->type.type)) {                                                  \
     55                        printf("%d ", (int)IMAGE->data.TYPE[i][j]);                                                      \
     56                    } else {                                                                                             \
     57                        printf("%.2f ", (double)IMAGE->data.TYPE[i][j]);                                                   \
     58                    }                                                                                                    \
     59            }                                                                                                        \
     60        printf("\n");                                                                                            \
     61    }                                                                                                            \
    6262printf("\n");
    6363
     
    6666psVector *NAME = (psVector*)psVectorAlloc(SIZE, PS_TYPE_##TYPE);                                             \
    6767for(int i=0; i<SIZE; i++) {                                                                                  \
    68     NAME->data.TYPE[i] = VALUE;                                                                              \
    69 }                                                                                                            \
     68        NAME->data.TYPE[i] = VALUE;                                                                              \
     69    }                                                                                                            \
    7070NAME->n = SIZE;
    7171
     
    7474psImage *NAME = (psImage*)psImageAlloc(NCOLS,NROWS,PS_TYPE_##TYPE);                                          \
    7575for(int i=0; i<NAME->numRows; i++) {                                                                         \
    76     for(int j=0; j<NAME->numCols; j++) {                                                                     \
    77         NAME->data.TYPE[i][j] = VALUE;                                                                       \
    78     }                                                                                                        \
    79 }
    80 
    81 
     76        for(int j=0; j<NAME->numCols; j++) {                                                                     \
     77                NAME->data.TYPE[i][j] = VALUE;                                                                       \
     78            }                                                                                                        \
     79    }
     80   
     81   
    8282#define CHECK_MEMORY                                                                                         \
    8383psMemCheckLeaks(0, NULL, stdout);                                                                            \
    8484int nBad = psMemCheckCorruption(0);                                                                          \
    8585if(nBad) {                                                                                                   \
    86     printf("ERROR: Found %d bad memory blocks\n", nBad);                                                     \
    87 }
    88 
    89 
    90 int main(int argc, char* argv[])
     86        printf("ERROR: Found %d bad memory blocks\n", nBad);                                                     \
     87    }
     88   
     89   
     90int main( int argc, char* argv[] )
    9191{
    9292
     
    109109        printFooter(stdout, "psMatrixVectorArithmetic", "Test matrix psUnaryOp", true);                      \
    110110    }
    111 
    112     testBinaryOpM(abs,S32,-10,0,3,2);
    113     testBinaryOpM(abs,F32,-10.0,0.0,3,2);
    114     testBinaryOpM(abs,F64,-10.0,0.0,3,2);
    115     testBinaryOpM(abs,C32,-10.0-10.0i,0.0+0.0i,3,2);
    116     testBinaryOpM(exp,S32,10,0,3,2);
    117     testBinaryOpM(exp,F32,10.0,0.0,3,2);
    118     testBinaryOpM(exp,F64,10.0,0.0,3,2);
    119     testBinaryOpM(exp,C32,10.0+10.0i,0.0+0.0i,3,2);
    120     testBinaryOpM(ln,S32,10,0,3,2);
    121     testBinaryOpM(ln,F32,10.0,0.0,3,2);
    122     testBinaryOpM(ln,F64,10.0,0.0,3,2);
    123     testBinaryOpM(ln,C32,10.0+10.0i,0.0+0.0i,3,2);
    124     testBinaryOpM(ten,S32,3,0,3,2);
    125     testBinaryOpM(ten,F32,3.0,0.0,3,2);
    126     testBinaryOpM(ten,F64,3.0,0.0,3,2);
    127     testBinaryOpM(ten,C32,3.0+3.0i,0.0+0.0i,3,2);
    128     testBinaryOpM(log,S32,1000,0,3,2);
    129     testBinaryOpM(log,F32,1000.0,0.0,3,2);
    130     testBinaryOpM(log,F64,1000.0,0.0,3,2);
    131     testBinaryOpM(log,C32,1000.0+1000.0i,0.0+0.0i,3,2);
    132     testBinaryOpM(sin,S32,M_PI_2,0,3,2);
    133     testBinaryOpM(sin,F32,M_PI_2,0.0,3,2);
    134     testBinaryOpM(sin,F64,M_PI_2,0.0,3,2);
    135     testBinaryOpM(sin,C32,M_PI_2+1.57079632679489661923i,0.0+0.0i,3,2);
    136     testBinaryOpM(dsin,S32,90,0,3,2);
    137     testBinaryOpM(dsin,F32,90.0,0.0,3,2);
    138     testBinaryOpM(dsin,F64,90.0,0.0,3,2);
    139     testBinaryOpM(dsin,C32,90.0+90.0i,0.0+0.0i,3,2);
    140     testBinaryOpM(cos,S32,0,0,3,2);
    141     testBinaryOpM(cos,F32,0.0,0.0,3,2);
    142     testBinaryOpM(cos,F64,0.0,0.0,3,2);
    143     testBinaryOpM(cos,C32,0.0+0.0i,0.0+0.0i,3,2);
    144     testBinaryOpM(dcos,S32,0,0,3,2);
    145     testBinaryOpM(dcos,F32,0.0,0.0,3,2);
    146     testBinaryOpM(dcos,F64,0.0,0.0,3,2);
    147     testBinaryOpM(dcos,C32,0.0+0.0i,0.0+0.0i,3,2);
    148     testBinaryOpM(tan,S32,M_PI_4,0,3,2);
    149     testBinaryOpM(tan,F32,M_PI_4,0.0,3,2);
    150     testBinaryOpM(tan,F64,M_PI_4,0.0,3,2);
    151     testBinaryOpM(tan,C32,M_PI_4+0.78539816339744830962i,0.0+0.0i,3,2);
    152     testBinaryOpM(dtan,S32,45,0,3,2);
    153     testBinaryOpM(dtan,F32,45.0,0.0,3,2);
    154     testBinaryOpM(dtan,F64,45.0,0.0,3,2);
    155     testBinaryOpM(dtan,C32,45.0+45.0i,0.0+0.0i,3,2);
    156     testBinaryOpM(asin,S32,1,0,3,2);
    157     testBinaryOpM(asin,F32,1.0,0.0,3,2);
    158     testBinaryOpM(asin,F64,1.0,0.0,3,2);
    159     testBinaryOpM(asin,C32,1.0+1.0i,0.0+0.0i,3,2);
    160     testBinaryOpM(dasin,S32,1.0,0,3,2);
    161     testBinaryOpM(dasin,F32,1.0,0.0,3,2);
    162     testBinaryOpM(dasin,F64,1.0,0.0,3,2);
    163     testBinaryOpM(dasin,C32,1.0+1.0i,0.0+0.0i,3,2);
    164     testBinaryOpM(acos,S32,0,0,3,2);
    165     testBinaryOpM(acos,F32,0.0,0.0,3,2);
    166     testBinaryOpM(acos,F64,0.0,0.0,3,2);
    167     testBinaryOpM(acos,C32,0.0+0.0i,0.0+0.0i,3,2);
    168     testBinaryOpM(dacos,S32,0,0,3,2);
    169     testBinaryOpM(dacos,F32,0.0,0.0,3,2);
    170     testBinaryOpM(dacos,F64,0.0,0.0,3,2);
    171     testBinaryOpM(dacos,C32,0.0+0.0i,0.0+0.0i,3,2);
    172     testBinaryOpM(atan,S32,1,0,3,2);
    173     testBinaryOpM(atan,F32,1.0,0.0,3,2);
    174     testBinaryOpM(atan,F64,1.0,0.0,3,2);
    175     testBinaryOpM(atan,C32,1.0+1.0i,0.0+0.0i,3,2);
    176     testBinaryOpM(datan,S32,1,0,3,2);
    177     testBinaryOpM(datan,F32,1.0,0.0,3,2);
    178     testBinaryOpM(datan,F64,1.0,0.0,3,2);
    179     testBinaryOpM(datan,C32,1.0+1.0i,0.0+0.0i,3,2);
    180 
    181 
     111   
     112    testBinaryOpM( abs, S32, -10, 0, 3, 2 );
     113    testBinaryOpM( abs, F32, -10.0, 0.0, 3, 2 );
     114    testBinaryOpM( abs, F64, -10.0, 0.0, 3, 2 );
     115    testBinaryOpM( abs, C32, -10.0 - 10.0i, 0.0 + 0.0i, 3, 2 );
     116    testBinaryOpM( exp, S32, 10, 0, 3, 2 );
     117    testBinaryOpM( exp, F32, 10.0, 0.0, 3, 2 );
     118    testBinaryOpM( exp, F64, 10.0, 0.0, 3, 2 );
     119    testBinaryOpM( exp, C32, 10.0 + 10.0i, 0.0 + 0.0i, 3, 2 );
     120    testBinaryOpM( ln, S32, 10, 0, 3, 2 );
     121    testBinaryOpM( ln, F32, 10.0, 0.0, 3, 2 );
     122    testBinaryOpM( ln, F64, 10.0, 0.0, 3, 2 );
     123    testBinaryOpM( ln, C32, 10.0 + 10.0i, 0.0 + 0.0i, 3, 2 );
     124    testBinaryOpM( ten, S32, 3, 0, 3, 2 );
     125    testBinaryOpM( ten, F32, 3.0, 0.0, 3, 2 );
     126    testBinaryOpM( ten, F64, 3.0, 0.0, 3, 2 );
     127    testBinaryOpM( ten, C32, 3.0 + 3.0i, 0.0 + 0.0i, 3, 2 );
     128    testBinaryOpM( log, S32, 1000, 0, 3, 2 );
     129    testBinaryOpM( log, F32, 1000.0, 0.0, 3, 2 );
     130    testBinaryOpM( log, F64, 1000.0, 0.0, 3, 2 );
     131    testBinaryOpM( log, C32, 1000.0 + 1000.0i, 0.0 + 0.0i, 3, 2 );
     132    testBinaryOpM( sin, S32, M_PI_2, 0, 3, 2 );
     133    testBinaryOpM( sin, F32, M_PI_2, 0.0, 3, 2 );
     134    testBinaryOpM( sin, F64, M_PI_2, 0.0, 3, 2 );
     135    testBinaryOpM( sin, C32, M_PI_2 + 1.57079632679489661923i, 0.0 + 0.0i, 3, 2 );
     136    testBinaryOpM( dsin, S32, 90, 0, 3, 2 );
     137    testBinaryOpM( dsin, F32, 90.0, 0.0, 3, 2 );
     138    testBinaryOpM( dsin, F64, 90.0, 0.0, 3, 2 );
     139    testBinaryOpM( dsin, C32, 90.0 + 90.0i, 0.0 + 0.0i, 3, 2 );
     140    testBinaryOpM( cos, S32, 0, 0, 3, 2 );
     141    testBinaryOpM( cos, F32, 0.0, 0.0, 3, 2 );
     142    testBinaryOpM( cos, F64, 0.0, 0.0, 3, 2 );
     143    testBinaryOpM( cos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, 2 );
     144    testBinaryOpM( dcos, S32, 0, 0, 3, 2 );
     145    testBinaryOpM( dcos, F32, 0.0, 0.0, 3, 2 );
     146    testBinaryOpM( dcos, F64, 0.0, 0.0, 3, 2 );
     147    testBinaryOpM( dcos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, 2 );
     148    testBinaryOpM( tan, S32, M_PI_4, 0, 3, 2 );
     149    testBinaryOpM( tan, F32, M_PI_4, 0.0, 3, 2 );
     150    testBinaryOpM( tan, F64, M_PI_4, 0.0, 3, 2 );
     151    testBinaryOpM( tan, C32, M_PI_4 + 0.78539816339744830962i, 0.0 + 0.0i, 3, 2 );
     152    testBinaryOpM( dtan, S32, 45, 0, 3, 2 );
     153    testBinaryOpM( dtan, F32, 45.0, 0.0, 3, 2 );
     154    testBinaryOpM( dtan, F64, 45.0, 0.0, 3, 2 );
     155    testBinaryOpM( dtan, C32, 45.0 + 45.0i, 0.0 + 0.0i, 3, 2 );
     156    testBinaryOpM( asin, S32, 1, 0, 3, 2 );
     157    testBinaryOpM( asin, F32, 1.0, 0.0, 3, 2 );
     158    testBinaryOpM( asin, F64, 1.0, 0.0, 3, 2 );
     159    testBinaryOpM( asin, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3, 2 );
     160    testBinaryOpM( dasin, S32, 1.0, 0, 3, 2 );
     161    testBinaryOpM( dasin, F32, 1.0, 0.0, 3, 2 );
     162    testBinaryOpM( dasin, F64, 1.0, 0.0, 3, 2 );
     163    testBinaryOpM( dasin, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3, 2 );
     164    testBinaryOpM( acos, S32, 0, 0, 3, 2 );
     165    testBinaryOpM( acos, F32, 0.0, 0.0, 3, 2 );
     166    testBinaryOpM( acos, F64, 0.0, 0.0, 3, 2 );
     167    testBinaryOpM( acos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, 2 );
     168    testBinaryOpM( dacos, S32, 0, 0, 3, 2 );
     169    testBinaryOpM( dacos, F32, 0.0, 0.0, 3, 2 );
     170    testBinaryOpM( dacos, F64, 0.0, 0.0, 3, 2 );
     171    testBinaryOpM( dacos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3, 2 );
     172    testBinaryOpM( atan, S32, 1, 0, 3, 2 );
     173    testBinaryOpM( atan, F32, 1.0, 0.0, 3, 2 );
     174    testBinaryOpM( atan, F64, 1.0, 0.0, 3, 2 );
     175    testBinaryOpM( atan, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3, 2 );
     176    testBinaryOpM( datan, S32, 1, 0, 3, 2 );
     177    testBinaryOpM( datan, F32, 1.0, 0.0, 3, 2 );
     178    testBinaryOpM( datan, F64, 1.0, 0.0, 3, 2 );
     179    testBinaryOpM( datan, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3, 2 );
     180   
     181   
    182182    // Test vector unary operations
    183183    #define testBinaryOpV(OP,TYPE,VALUE1,VALUE2,SIZE)                                                        \
     
    198198        printFooter(stdout, "psMatrixVectorArithmetic", "Test vector psUnaryOp", true);                      \
    199199    }
    200 
    201     testBinaryOpV(abs,S32,-10,0,3);
    202     testBinaryOpV(abs,F32,-10.0,0.0,3);
    203     testBinaryOpV(abs,F64,-10.0,0.0,3);
    204     testBinaryOpV(abs,C32,-10.0-10.0i,0.0+0.0i,3);
    205     testBinaryOpV(exp,S32,10,0,3);
    206     testBinaryOpV(exp,F32,10.0,0.0,3);
    207     testBinaryOpV(exp,F64,10.0,0.0,3);
    208     testBinaryOpV(exp,C32,10.0+10.0i,0.0+0.0i,3);
    209     testBinaryOpV(ln,S32,10,0,3);
    210     testBinaryOpV(ln,F32,10.0,0.0,3);
    211     testBinaryOpV(ln,F64,10.0,0.0,3);
    212     testBinaryOpV(ln,C32,10.0+10.0i,0.0+0.0i,3);
    213     testBinaryOpV(ten,S32,3,0,3);
    214     testBinaryOpV(ten,F32,3.0,0.0,3);
    215     testBinaryOpV(ten,F64,3.0,0.0,3);
    216     testBinaryOpV(ten,C32,3.0+3.0i,0.0+0.0i,3);
    217     testBinaryOpV(log,S32,1000,0,3);
    218     testBinaryOpV(log,F32,1000.0,0.0,3);
    219     testBinaryOpV(log,F64,1000.0,0.0,3);
    220     testBinaryOpV(log,C32,1000.0+1000.0i,0.0+0.0i,3);
    221     testBinaryOpV(sin,S32,M_PI_2,0,3);
    222     testBinaryOpV(sin,F32,M_PI_2,0.0,3);
    223     testBinaryOpV(sin,F64,M_PI_2,0.0,3);
    224     testBinaryOpV(sin,C32,M_PI_2+1.57079632679489661923i,0.0+0.0i,3);
    225     testBinaryOpV(dsin,S32,90,0,3);
    226     testBinaryOpV(dsin,F32,90.0,0.0,3);
    227     testBinaryOpV(dsin,F64,90.0,0.0,3);
    228     testBinaryOpV(dsin,C32,90.0+90.0i,0.0+0.0i,3);
    229     testBinaryOpV(cos,S32,0,0,3);
    230     testBinaryOpV(cos,F32,0.0,0.0,3);
    231     testBinaryOpV(cos,F64,0.0,0.0,3);
    232     testBinaryOpV(cos,C32,0.0+0.0i,0.0+0.0i,3);
    233     testBinaryOpV(dcos,S32,0,0,3);
    234     testBinaryOpV(dcos,F32,0.0,0.0,3);
    235     testBinaryOpV(dcos,F64,0.0,0.0,3);
    236     testBinaryOpV(dcos,C32,0.0+0.0i,0.0+0.0i,3);
    237     testBinaryOpV(tan,S32,M_PI_4,0,3);
    238     testBinaryOpV(tan,F32,M_PI_4,0.0,3);
    239     testBinaryOpV(tan,F64,M_PI_4,0.0,3);
    240     testBinaryOpV(tan,C32,M_PI_4+0.78539816339744830962i,0.0+0.0i,3);
    241     testBinaryOpV(dtan,S32,45,0,3);
    242     testBinaryOpV(dtan,F32,45.0,0.0,3);
    243     testBinaryOpV(dtan,F64,45.0,0.0,3);
    244     testBinaryOpV(dtan,C32,45.0+45.0i,0.0+0.0i,3);
    245     testBinaryOpV(asin,S32,1,0,3);
    246     testBinaryOpV(asin,F32,1.0,0.0,3);
    247     testBinaryOpV(asin,F64,1.0,0.0,3);
    248     testBinaryOpV(asin,C32,1.0+1.0i,0.0+0.0i,3);
    249     testBinaryOpV(dasin,S32,1.0,0,3);
    250     testBinaryOpV(dasin,F32,1.0,0.0,3);
    251     testBinaryOpV(dasin,F64,1.0,0.0,3);
    252     testBinaryOpV(dasin,C32,1.0+1.0i,0.0+0.0i,3);
    253     testBinaryOpV(acos,S32,0,0,3);
    254     testBinaryOpV(acos,F32,0.0,0.0,3);
    255     testBinaryOpV(acos,F64,0.0,0.0,3);
    256     testBinaryOpV(acos,C32,0.0+0.0i,0.0+0.0i,3);
    257     testBinaryOpV(dacos,S32,0,0,3);
    258     testBinaryOpV(dacos,F32,0.0,0.0,3);
    259     testBinaryOpV(dacos,F64,0.0,0.0,3);
    260     testBinaryOpV(dacos,C32,0.0+0.0i,0.0+0.0i,3);
    261     testBinaryOpV(atan,S32,1,0,3);
    262     testBinaryOpV(atan,F32,1.0,0.0,3);
    263     testBinaryOpV(atan,F64,1.0,0.0,3);
    264     testBinaryOpV(atan,C32,1.0+1.0i,0.0+0.0i,3);
    265     testBinaryOpV(datan,S32,1,0,3);
    266     testBinaryOpV(datan,F32,1.0,0.0,3);
    267     testBinaryOpV(datan,F64,1.0,0.0,3);
    268     testBinaryOpV(datan,C32,1.0+1.0i,0.0+0.0i,3);
    269 
     200   
     201    testBinaryOpV( abs, S32, -10, 0, 3 );
     202    testBinaryOpV( abs, F32, -10.0, 0.0, 3 );
     203    testBinaryOpV( abs, F64, -10.0, 0.0, 3 );
     204    testBinaryOpV( abs, C32, -10.0 - 10.0i, 0.0 + 0.0i, 3 );
     205    testBinaryOpV( exp, S32, 10, 0, 3 );
     206    testBinaryOpV( exp, F32, 10.0, 0.0, 3 );
     207    testBinaryOpV( exp, F64, 10.0, 0.0, 3 );
     208    testBinaryOpV( exp, C32, 10.0 + 10.0i, 0.0 + 0.0i, 3 );
     209    testBinaryOpV( ln, S32, 10, 0, 3 );
     210    testBinaryOpV( ln, F32, 10.0, 0.0, 3 );
     211    testBinaryOpV( ln, F64, 10.0, 0.0, 3 );
     212    testBinaryOpV( ln, C32, 10.0 + 10.0i, 0.0 + 0.0i, 3 );
     213    testBinaryOpV( ten, S32, 3, 0, 3 );
     214    testBinaryOpV( ten, F32, 3.0, 0.0, 3 );
     215    testBinaryOpV( ten, F64, 3.0, 0.0, 3 );
     216    testBinaryOpV( ten, C32, 3.0 + 3.0i, 0.0 + 0.0i, 3 );
     217    testBinaryOpV( log, S32, 1000, 0, 3 );
     218    testBinaryOpV( log, F32, 1000.0, 0.0, 3 );
     219    testBinaryOpV( log, F64, 1000.0, 0.0, 3 );
     220    testBinaryOpV( log, C32, 1000.0 + 1000.0i, 0.0 + 0.0i, 3 );
     221    testBinaryOpV( sin, S32, M_PI_2, 0, 3 );
     222    testBinaryOpV( sin, F32, M_PI_2, 0.0, 3 );
     223    testBinaryOpV( sin, F64, M_PI_2, 0.0, 3 );
     224    testBinaryOpV( sin, C32, M_PI_2 + 1.57079632679489661923i, 0.0 + 0.0i, 3 );
     225    testBinaryOpV( dsin, S32, 90, 0, 3 );
     226    testBinaryOpV( dsin, F32, 90.0, 0.0, 3 );
     227    testBinaryOpV( dsin, F64, 90.0, 0.0, 3 );
     228    testBinaryOpV( dsin, C32, 90.0 + 90.0i, 0.0 + 0.0i, 3 );
     229    testBinaryOpV( cos, S32, 0, 0, 3 );
     230    testBinaryOpV( cos, F32, 0.0, 0.0, 3 );
     231    testBinaryOpV( cos, F64, 0.0, 0.0, 3 );
     232    testBinaryOpV( cos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3 );
     233    testBinaryOpV( dcos, S32, 0, 0, 3 );
     234    testBinaryOpV( dcos, F32, 0.0, 0.0, 3 );
     235    testBinaryOpV( dcos, F64, 0.0, 0.0, 3 );
     236    testBinaryOpV( dcos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3 );
     237    testBinaryOpV( tan, S32, M_PI_4, 0, 3 );
     238    testBinaryOpV( tan, F32, M_PI_4, 0.0, 3 );
     239    testBinaryOpV( tan, F64, M_PI_4, 0.0, 3 );
     240    testBinaryOpV( tan, C32, M_PI_4 + 0.78539816339744830962i, 0.0 + 0.0i, 3 );
     241    testBinaryOpV( dtan, S32, 45, 0, 3 );
     242    testBinaryOpV( dtan, F32, 45.0, 0.0, 3 );
     243    testBinaryOpV( dtan, F64, 45.0, 0.0, 3 );
     244    testBinaryOpV( dtan, C32, 45.0 + 45.0i, 0.0 + 0.0i, 3 );
     245    testBinaryOpV( asin, S32, 1, 0, 3 );
     246    testBinaryOpV( asin, F32, 1.0, 0.0, 3 );
     247    testBinaryOpV( asin, F64, 1.0, 0.0, 3 );
     248    testBinaryOpV( asin, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3 );
     249    testBinaryOpV( dasin, S32, 1.0, 0, 3 );
     250    testBinaryOpV( dasin, F32, 1.0, 0.0, 3 );
     251    testBinaryOpV( dasin, F64, 1.0, 0.0, 3 );
     252    testBinaryOpV( dasin, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3 );
     253    testBinaryOpV( acos, S32, 0, 0, 3 );
     254    testBinaryOpV( acos, F32, 0.0, 0.0, 3 );
     255    testBinaryOpV( acos, F64, 0.0, 0.0, 3 );
     256    testBinaryOpV( acos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3 );
     257    testBinaryOpV( dacos, S32, 0, 0, 3 );
     258    testBinaryOpV( dacos, F32, 0.0, 0.0, 3 );
     259    testBinaryOpV( dacos, F64, 0.0, 0.0, 3 );
     260    testBinaryOpV( dacos, C32, 0.0 + 0.0i, 0.0 + 0.0i, 3 );
     261    testBinaryOpV( atan, S32, 1, 0, 3 );
     262    testBinaryOpV( atan, F32, 1.0, 0.0, 3 );
     263    testBinaryOpV( atan, F64, 1.0, 0.0, 3 );
     264    testBinaryOpV( atan, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3 );
     265    testBinaryOpV( datan, S32, 1, 0, 3 );
     266    testBinaryOpV( datan, F32, 1.0, 0.0, 3 );
     267    testBinaryOpV( datan, F64, 1.0, 0.0, 3 );
     268    testBinaryOpV( datan, C32, 1.0 + 1.0i, 0.0 + 0.0i, 3 );
     269   
    270270    return 0;
    271271}
Note: See TracChangeset for help on using the changeset viewer.