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.

Location:
trunk/psLib/test/dataManip
Files:
7 edited

Legend:

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

    r1327 r1365  
    11/*****************************************************************************
    2     This routine must ensure that the psHistogram structure is correctly
    3     populated by the procedure psGetArrayHistogram().
    4  
    5  *****************************************************************************/
     2   This routine must ensure that the psHistogram structure is correctly
     3   populated by the procedure psGetArrayHistogram().
     4
     5*****************************************************************************/
    66#include <stdio.h>
    77#include "pslib.h"
     
    1616int main()
    1717{
    18     psHistogram *myHist = NULL;
    19     psHistogram *myHist2= NULL;
    20     psVector *myData    = NULL;
    21     psVector *myMask    = NULL;
    22     int testStatus      = true;
    23     int memLeaks        = 0;
    24     int nb              = 0;
    25     int numBins         = 0;
    26     int i               = 0;
    27     int currentId       = 0;
    28 
    29     currentId       = psMemGetId();
    30 
     18    psHistogram * myHist = NULL;
     19    psHistogram *myHist2 = NULL;
     20    psVector *myData = NULL;
     21    psVector *myMask = NULL;
     22    int testStatus = true;
     23    int memLeaks = 0;
     24    int nb = 0;
     25    int numBins = 0;
     26    int i = 0;
     27    int currentId = 0;
     28   
     29    currentId = psMemGetId();
     30   
    3131    /*********************************************************************/
    3232    /*  Allocate and initialize data structures                          */
    3333    /*********************************************************************/
    34     myData = psVectorAlloc(NUM_DATA, PS_TYPE_F32);
     34    myData = psVectorAlloc( NUM_DATA, PS_TYPE_F32 );
    3535    myData->n = myData->nalloc;
    36     for (i=0;i<NUM_DATA;i++) {
    37         myData->data.F32[i] = LOWER + ((UPPER - LOWER) / (float) NUM_DATA) * (float) i;
    38     }
    39 
    40     myMask = psVectorAlloc(NUM_DATA, PS_TYPE_U8);
     36    for ( i = 0;i < NUM_DATA;i++ ) {
     37            myData->data.F32[ i ] = LOWER + ( ( UPPER - LOWER ) / ( float ) NUM_DATA ) * ( float ) i;
     38        }
     39       
     40    myMask = psVectorAlloc( NUM_DATA, PS_TYPE_U8 );
    4141    myMask->n = myMask->nalloc;
    42     for (i=0;i<NUM_DATA;i++) {
    43         if (i >= (NUM_DATA/2)) {
    44             myMask->data.U8[i] = 1;
    45         } else {
    46             myMask->data.U8[i] = 0;
     42    for ( i = 0;i < NUM_DATA;i++ ) {
     43            if ( i >= ( NUM_DATA / 2 ) ) {
     44                    myMask->data.U8[ i ] = 1;
     45                } else {
     46                    myMask->data.U8[ i ] = 0;
     47                }
    4748        }
    48     }
    49 
    50     for (nb=0;nb<4;nb++) {
    51         if (nb == 0)
    52             numBins = 1;
    53         if (nb == 1)
    54             numBins = 2;
    55         if (nb == 2)
    56             numBins = 10;
    57         if (nb == 3)
    58             numBins = 20;
    59 
    60         /*********************************************************************/
    61         /*  Allocate and Perform Histogram, no mask                          */
    62         /*********************************************************************/
    63         printPositiveTestHeader(stdout,
    64                                 "psStats functions",
    65                                 "Allocate and Perform Histogram, no mask");
    66 
    67         myHist = psHistogramAlloc(LOWER, UPPER, numBins);
    68         myHist = psVectorHistogram(myHist, myData, NULL, 0);
    69 
    70         for (i=0;i<numBins;i++) {
    71             printf("Bin number %d bounds: (%f - %f) data (%d)\n", i,
    72                    myHist->bounds->data.F32[i],
    73                    myHist->bounds->data.F32[i+1],
    74                    myHist->nums->data.U32[i]);
     49       
     50    for ( nb = 0;nb < 4;nb++ ) {
     51            if ( nb == 0 )
     52                numBins = 1;
     53            if ( nb == 1 )
     54                numBins = 2;
     55            if ( nb == 2 )
     56                numBins = 10;
     57            if ( nb == 3 )
     58                numBins = 20;
     59               
     60            /*********************************************************************/
     61            /*  Allocate and Perform Histogram, no mask                          */
     62            /*********************************************************************/
     63            printPositiveTestHeader( stdout,
     64                                     "psStats functions",
     65                                     "Allocate and Perform Histogram, no mask" );
     66                                     
     67            myHist = psHistogramAlloc( LOWER, UPPER, numBins );
     68            myHist = psVectorHistogram( myHist, myData, NULL, 0 );
     69           
     70            for ( i = 0;i < numBins;i++ ) {
     71                    printf( "Bin number %d bounds: (%.2f - %.2f) data (%d)\n", i,
     72                            myHist->bounds->data.F32[ i ],
     73                            myHist->bounds->data.F32[ i + 1 ],
     74                            myHist->nums->data.U32[ i ] );
     75                }
     76            psMemCheckCorruption( 1 );
     77            psFree( myHist );
     78            psMemCheckCorruption( 1 );
     79           
     80            printFooter( stdout,
     81                         "psStats functions",
     82                         "Allocate and Perform Histogram, no mask",
     83                         testStatus );
     84                         
     85            /*********************************************************************/
     86            /*  Allocate and Perform Histogram with mask                         */
     87            /*********************************************************************/
     88            printPositiveTestHeader( stdout,
     89                                     "psStats functions",
     90                                     "Allocate and Perform Histogram with mask" );
     91                                     
     92            myHist = psHistogramAlloc( LOWER, UPPER, numBins );
     93            myHist = psVectorHistogram( myHist, myData, myMask, 1 );
     94           
     95            for ( i = 0;i < numBins;i++ ) {
     96                    printf( "Bin number %d bounds: (%6.3f - %6.3f) data (%d)\n", i,
     97                            myHist->bounds->data.F32[ i ],
     98                            myHist->bounds->data.F32[ i + 1 ],
     99                            myHist->nums->data.U32[ i ] );
     100                }
     101            psMemCheckCorruption( 1 );
     102            psFree( myHist );
     103            psMemCheckCorruption( 1 );
     104           
     105            printFooter( stdout,
     106                         "psStats functions",
     107                         "Allocate and Perform Histogram with mask",
     108                         testStatus );
    75109        }
    76         psMemCheckCorruption(1);
    77         psFree(myHist);
    78         psMemCheckCorruption(1);
    79 
    80         printFooter(stdout,
    81                     "psStats functions",
    82                     "Allocate and Perform Histogram, no mask",
    83                     testStatus);
    84 
    85         /*********************************************************************/
    86         /*  Allocate and Perform Histogram with mask                         */
    87         /*********************************************************************/
    88         printPositiveTestHeader(stdout,
    89                                 "psStats functions",
    90                                 "Allocate and Perform Histogram with mask");
    91 
    92         myHist = psHistogramAlloc(LOWER, UPPER, numBins);
    93         myHist = psVectorHistogram(myHist, myData, myMask, 1);
    94 
    95         for (i=0;i<numBins;i++) {
    96             printf("Bin number %d bounds: (%6.3f - %6.3f) data (%d)\n", i,
    97                    myHist->bounds->data.F32[i],
    98                    myHist->bounds->data.F32[i+1],
    99                    myHist->nums->data.U32[i]);
    100         }
    101         psMemCheckCorruption(1);
    102         psFree(myHist);
    103         psMemCheckCorruption(1);
    104 
    105         printFooter(stdout,
    106                     "psStats functions",
    107                     "Allocate and Perform Histogram with mask",
    108                     testStatus);
    109     }
    110     psFree(myMask);
    111 
    112     printPositiveTestHeader(stdout,
    113                             "psStats functions",
    114                             "Calling psVectorHistogram() with various NULL inputs.");
    115 
     110    psFree( myMask );
     111   
     112    printPositiveTestHeader( stdout,
     113                             "psStats functions",
     114                             "Calling psVectorHistogram() with various NULL inputs." );
     115                             
    116116    // Verify the return value is null and program execution doesn't stop,
    117117    // if input parameter myHist is null.
    118 
    119     myHist2 = psVectorHistogram(NULL, myData, NULL, 0);
    120     if (myHist2 != NULL) {
    121         printf("ERROR: myHist2!=NULL\n");
    122         testStatus = false;
    123     }
    124     psFree(myData);
    125 
    126 
     118   
     119    myHist2 = psVectorHistogram( NULL, myData, NULL, 0 );
     120    if ( myHist2 != NULL ) {
     121            printf( "ERROR: myHist2!=NULL\n" );
     122            testStatus = false;
     123        }
     124    psFree( myData );
     125   
     126   
    127127    // Verify the retrun value is the same as the input parameter myHist and
    128128    // program execution doesn't stop, if the input parameter myArray is
    129129    // null.
    130 
    131     myHist = psHistogramAlloc(LOWER, UPPER, numBins);
    132     myHist = psVectorHistogram(myHist, NULL, NULL, 0);
    133     if (myHist == NULL) {
    134         printf("ERROR: myHist==NULL\n");
    135         testStatus = false;
    136     }
    137     psFree(myHist);
    138 
    139 
     130   
     131    myHist = psHistogramAlloc( LOWER, UPPER, numBins );
     132    myHist = psVectorHistogram( myHist, NULL, NULL, 0 );
     133    if ( myHist == NULL ) {
     134            printf( "ERROR: myHist==NULL\n" );
     135            testStatus = false;
     136        }
     137    psFree( myHist );
     138   
     139   
    140140    // Verify the return value is the same as the input parameter myHist and
    141141    // program execution doesn't stop, if the input parameter myArray has no
     
    155155    psFree(myData);
    156156    */
    157     printFooter(stdout,
    158                 "psStats functions",
    159                 "Calling psVectorHistogram() with various NULL inputs.",
    160                 testStatus);
    161 
     157    printFooter( stdout,
     158                 "psStats functions",
     159                 "Calling psVectorHistogram() with various NULL inputs.",
     160                 testStatus );
     161                 
    162162    /*************************************************************************/
    163163    /*  Deallocate data structures                                   */
    164164    /*************************************************************************/
    165     printPositiveTestHeader(stdout,
    166                             "psStats functions",
    167                             "Deallocate the psHistogram structure.");
    168 
    169     psMemCheckCorruption(1);
    170     memLeaks = psMemCheckLeaks(currentId,NULL,NULL);
    171     if (0 != memLeaks) {
    172         psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
    173     }
    174     psMemCheckCorruption(1);
    175 
    176     printFooter(stdout,
    177                 "psStats functions",
    178                 "Deallocate the psHistogram structure.",
    179                 testStatus);
    180 
    181     return (!testStatus);
     165    printPositiveTestHeader( stdout,
     166                             "psStats functions",
     167                             "Deallocate the psHistogram structure." );
     168                             
     169    psMemCheckCorruption( 1 );
     170    memLeaks = psMemCheckLeaks( currentId, NULL, NULL );
     171    if ( 0 != memLeaks ) {
     172            psAbort( __func__, "Memory Leaks! (%d leaks)", memLeaks );
     173        }
     174    psMemCheckCorruption( 1 );
     175   
     176    printFooter( stdout,
     177                 "psStats functions",
     178                 "Deallocate the psHistogram structure.",
     179                 testStatus );
     180                 
     181    return ( !testStatus );
    182182}
  • 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}
  • trunk/psLib/test/dataManip/tst_psStats07.c

    r1281 r1365  
    11/*****************************************************************************
    2     This routine must ensure that PS_STAT_ROBUST_QUARTILE is correctly computed
    3     by the procedure psArrayStats().
    4  *****************************************************************************/
     2   This routine must ensure that PS_STAT_ROBUST_QUARTILE is correctly computed
     3   by the procedure psArrayStats().
     4*****************************************************************************/
    55#include <stdio.h>
    66#include "pslib.h"
     
    1717int main()
    1818{
    19     psStats *myStats    = NULL;
    20     int testStatus      = true;
     19    psStats * myStats = NULL;
     20    int testStatus = true;
    2121    int globalTestStatus = true;
    22     int i               = 0;
    23     psVector *myVector  = NULL;
    24     psVector *maskVector= NULL;
     22    int i = 0;
     23    psVector *myVector = NULL;
     24    psVector *maskVector = NULL;
    2525    // NOTE: These values were calculated by running the function on the data.
    2626    // A: They must be changed if we adjust the number of data points.
    2727    // B: We don't really know that they are correct.
    28     int count           = 0;
    29     int currentId       = psMemGetId();
    30     int memLeaks        = 0;
     28    int count = 0;
     29    int currentId = psMemGetId();
     30    int memLeaks = 0;
    3131    float realMeanNoMask = MEAN;
    3232    float realMedianNoMask = MEAN;
    3333    float realModeNoMask = MEAN;
    3434    float realStdevNoMask = STDEV * 0.33;
    35     float realLQNoMask = MEAN - (0.6 * STDEV);
    36     float realUQNoMask = MEAN + (0.6 * STDEV);
    37     float realN50NoMask = (float) N/4;
    38     float realNfitNoMask = (float) N/4;
     35    float realLQNoMask = MEAN - ( 0.6 * STDEV );
     36    float realUQNoMask = MEAN + ( 0.6 * STDEV );
     37    float realN50NoMask = ( float ) N / 4;
     38    float realNfitNoMask = ( float ) N / 4;
    3939    float realMeanWithMask = MEAN;
    4040    float realMedianWithMask = MEAN;
     
    4343    float realLQWithMask = MEAN;
    4444    float realUQWithMask = MEAN;
    45     float realN50WithMask = (float) N/4;
    46     float realNfitWithMask = (float) N/4;
    47 
    48 
     45    float realN50WithMask = ( float ) N / 4;
     46    float realNfitWithMask = ( float ) N / 4;
     47   
     48   
    4949    /*************************************************************************/
    5050    /*  Allocate and initialize data structures                              */
    5151    /*************************************************************************/
    52     myStats = psStatsAlloc(PS_STAT_ROBUST_MEAN |
    53                            PS_STAT_ROBUST_MEDIAN |
    54                            PS_STAT_ROBUST_MODE |
    55                            PS_STAT_ROBUST_STDEV |
    56                            PS_STAT_ROBUST_QUARTILE);
    57 
    58     maskVector = psVectorAlloc(N, PS_TYPE_U8);
     52    myStats = psStatsAlloc( PS_STAT_ROBUST_MEAN |
     53                            PS_STAT_ROBUST_MEDIAN |
     54                            PS_STAT_ROBUST_MODE |
     55                            PS_STAT_ROBUST_STDEV |
     56                            PS_STAT_ROBUST_QUARTILE );
     57                           
     58    maskVector = psVectorAlloc( N, PS_TYPE_U8 );
    5959    maskVector->n = N;
    60     myVector = psGaussianDev(MEAN, STDEV, N);
     60    myVector = psGaussianDev( MEAN, STDEV, N );
    6161    // Set the mask vector and calculate the expected maximum.
    62     for (i=0;i<N;i++) {
    63         if (i < (N/2)) {
    64             maskVector->data.U8[i] = 0;
    65             count++;
    66         } else {
    67             maskVector->data.U8[i] = 1;
    68         }
    69     }
     62    for ( i = 0;i < N;i++ ) {
     63            if ( i < ( N / 2 ) ) {
     64                    maskVector->data.U8[ i ] = 0;
     65                    count++;
     66                } else {
     67                    maskVector->data.U8[ i ] = 1;
     68                }
     69        }
    7070    /*************************************************************************/
    7171    /*  Call psVectorStats() with no vector mask.                            */
    7272    /*************************************************************************/
    73     printPositiveTestHeader(stdout,
    74                             "psStats functions",
    75                             "PS_STAT_ROBUST_STATS: robust mean: no vector mask");
    76 
    77     myStats = psVectorStats(myStats, myVector, NULL, 0);
    78 
    79     printf("The expected Mean was %f; the calculated Mean was %f\n",
    80            realMeanNoMask, myStats->robustMean);
    81 
    82     if (fabs(myStats->robustMean - realMeanNoMask) < (ERROR_TOLERANCE * realMeanNoMask)) {
    83         testStatus = true;
    84     } else {
    85         testStatus = false;
    86         globalTestStatus = false;
    87     }
    88     printFooter(stdout,
    89                 "psVector functions",
    90                 "PS_STAT_ROBUST_STATS: robust mean: no vector mask",
    91                 testStatus);
    92 
    93 
    94     printPositiveTestHeader(stdout,
    95                             "psStats functions",
    96                             "PS_STAT_ROBUST_STATS: robust Median: no vector mask");
    97 
    98     printf("The expected Median was %f; the calculated Median was %f\n",
    99            realMedianNoMask, myStats->robustMedian);
    100     if (fabs(myStats->robustMedian - realMedianNoMask) < (ERROR_TOLERANCE * realMedianNoMask)) {
    101         testStatus = true;
    102     } else {
    103         testStatus = false;
    104         globalTestStatus = false;
    105     }
    106     printFooter(stdout,
    107                 "psVector functions",
    108                 "PS_STAT_ROBUST_STATS: robust Median: no vector mask",
    109                 testStatus);
    110 
    111     printPositiveTestHeader(stdout,
    112                             "psStats functions",
    113                             "PS_STAT_ROBUST_STATS: robust Mode: no vector mask");
    114 
    115 
    116     printf("The expected Mode was %f; the calculated Mode was %f\n",
    117            realModeNoMask, myStats->robustMode);
    118     if (fabs(myStats->robustMode - realModeNoMask) < (ERROR_TOLERANCE * realModeNoMask)) {
    119         testStatus = true;
    120     } else {
    121         testStatus = false;
    122         globalTestStatus = false;
    123     }
    124     printFooter(stdout,
    125                 "psVector functions",
    126                 "PS_STAT_ROBUST_STATS: robust Mode: no vector mask",
    127                 testStatus);
    128 
    129 
    130 
    131     printPositiveTestHeader(stdout,
    132                             "psStats functions",
    133                             "PS_STAT_ROBUST_STATS: robust Stdev: no vector mask");
    134 
    135     printf("The expected Stdev was %f; the calculated Stdev was %f\n",
    136            realStdevNoMask, myStats->robustStdev);
    137     if (fabs(myStats->robustStdev - realStdevNoMask) < (ERROR_TOLERANCE * realStdevNoMask)) {
    138         testStatus = true;
    139     } else {
    140         testStatus = false;
    141         globalTestStatus = false;
    142     }
    143     printFooter(stdout,
    144                 "psVector functions",
    145                 "PS_STAT_ROBUST_STATS: robust Stdev: no vector mask",
    146                 testStatus);
    147 
    148 
    149 
    150     printPositiveTestHeader(stdout,
    151                             "psStats functions",
    152                             "PS_STAT_ROBUST_STATS: lower quartile: no vector mask");
    153 
    154     printf("The expected LQ was %f; the calculated LQ was %f\n",
    155            realLQNoMask, myStats->robustLQ);
    156 
    157     if (fabs(myStats->robustLQ - realLQNoMask) < (ERROR_TOLERANCE * realLQNoMask)) {
    158         testStatus = true;
    159     } else {
    160         testStatus = false;
    161         globalTestStatus = false;
    162     }
    163     printFooter(stdout,
    164                 "psVector functions",
    165                 "PS_STAT_ROBUST_STATS: lower quartile: no vector mask",
    166                 testStatus);
    167 
    168 
    169 
    170     printPositiveTestHeader(stdout,
    171                             "psStats functions",
    172                             "PS_STAT_ROBUST_STATS: upper quartile: no vector mask");
    173 
    174     printf("The expected UQ was %f; the calculated UQ was %f\n",
    175            realUQNoMask, myStats->robustUQ);
    176     if (fabs(myStats->robustUQ - realUQNoMask) < (ERROR_TOLERANCE * realUQNoMask)) {
    177         testStatus = true;
    178     } else {
    179         testStatus = false;
    180         globalTestStatus = false;
    181     }
    182     printFooter(stdout,
    183                 "psVector functions",
    184                 "PS_STAT_ROBUST_STATS: lower quartile: no vector mask",
    185                 testStatus);
    186 
    187 
    188 
    189     printPositiveTestHeader(stdout,
    190                             "psStats functions",
    191                             "PS_STAT_ROBUST_STATS: robust N50: no vector mask");
    192 
     73    printPositiveTestHeader( stdout,
     74                             "psStats functions",
     75                             "PS_STAT_ROBUST_STATS: robust mean: no vector mask" );
     76                             
     77    myStats = psVectorStats( myStats, myVector, NULL, 0 );
     78   
     79    printf( "The expected Mean was %.2f; the calculated Mean was %.2f\n",
     80            realMeanNoMask, myStats->robustMean );
     81           
     82    if ( fabs( myStats->robustMean - realMeanNoMask ) < ( ERROR_TOLERANCE * realMeanNoMask ) ) {
     83            testStatus = true;
     84        } else {
     85            testStatus = false;
     86            globalTestStatus = false;
     87        }
     88    printFooter( stdout,
     89                 "psVector functions",
     90                 "PS_STAT_ROBUST_STATS: robust mean: no vector mask",
     91                 testStatus );
     92                 
     93                 
     94    printPositiveTestHeader( stdout,
     95                             "psStats functions",
     96                             "PS_STAT_ROBUST_STATS: robust Median: no vector mask" );
     97                             
     98    printf( "The expected Median was %.2f; the calculated Median was %.2f\n",
     99            realMedianNoMask, myStats->robustMedian );
     100    if ( fabs( myStats->robustMedian - realMedianNoMask ) < ( ERROR_TOLERANCE * realMedianNoMask ) ) {
     101            testStatus = true;
     102        } else {
     103            testStatus = false;
     104            globalTestStatus = false;
     105        }
     106    printFooter( stdout,
     107                 "psVector functions",
     108                 "PS_STAT_ROBUST_STATS: robust Median: no vector mask",
     109                 testStatus );
     110                 
     111    printPositiveTestHeader( stdout,
     112                             "psStats functions",
     113                             "PS_STAT_ROBUST_STATS: robust Mode: no vector mask" );
     114                             
     115                             
     116    printf( "The expected Mode was %.2f; the calculated Mode was %.2f\n",
     117            realModeNoMask, myStats->robustMode );
     118    if ( fabs( myStats->robustMode - realModeNoMask ) < ( ERROR_TOLERANCE * realModeNoMask ) ) {
     119            testStatus = true;
     120        } else {
     121            testStatus = false;
     122            globalTestStatus = false;
     123        }
     124    printFooter( stdout,
     125                 "psVector functions",
     126                 "PS_STAT_ROBUST_STATS: robust Mode: no vector mask",
     127                 testStatus );
     128                 
     129                 
     130                 
     131    printPositiveTestHeader( stdout,
     132                             "psStats functions",
     133                             "PS_STAT_ROBUST_STATS: robust Stdev: no vector mask" );
     134                             
     135    printf( "The expected Stdev was %.2f; the calculated Stdev was %.2f\n",
     136            realStdevNoMask, myStats->robustStdev );
     137    if ( fabs( myStats->robustStdev - realStdevNoMask ) < ( ERROR_TOLERANCE * realStdevNoMask ) ) {
     138            testStatus = true;
     139        } else {
     140            testStatus = false;
     141            globalTestStatus = false;
     142        }
     143    printFooter( stdout,
     144                 "psVector functions",
     145                 "PS_STAT_ROBUST_STATS: robust Stdev: no vector mask",
     146                 testStatus );
     147                 
     148                 
     149                 
     150    printPositiveTestHeader( stdout,
     151                             "psStats functions",
     152                             "PS_STAT_ROBUST_STATS: lower quartile: no vector mask" );
     153                             
     154    printf( "The expected LQ was %.2f; the calculated LQ was %.2f\n",
     155            realLQNoMask, myStats->robustLQ );
     156           
     157    if ( fabs( myStats->robustLQ - realLQNoMask ) < ( ERROR_TOLERANCE * realLQNoMask ) ) {
     158            testStatus = true;
     159        } else {
     160            testStatus = false;
     161            globalTestStatus = false;
     162        }
     163    printFooter( stdout,
     164                 "psVector functions",
     165                 "PS_STAT_ROBUST_STATS: lower quartile: no vector mask",
     166                 testStatus );
     167                 
     168                 
     169                 
     170    printPositiveTestHeader( stdout,
     171                             "psStats functions",
     172                             "PS_STAT_ROBUST_STATS: upper quartile: no vector mask" );
     173                             
     174    printf( "The expected UQ was %.2f; the calculated UQ was %.2f\n",
     175            realUQNoMask, myStats->robustUQ );
     176    if ( fabs( myStats->robustUQ - realUQNoMask ) < ( ERROR_TOLERANCE * realUQNoMask ) ) {
     177            testStatus = true;
     178        } else {
     179            testStatus = false;
     180            globalTestStatus = false;
     181        }
     182    printFooter( stdout,
     183                 "psVector functions",
     184                 "PS_STAT_ROBUST_STATS: lower quartile: no vector mask",
     185                 testStatus );
     186                 
     187                 
     188                 
     189    printPositiveTestHeader( stdout,
     190                             "psStats functions",
     191                             "PS_STAT_ROBUST_STATS: robust N50: no vector mask" );
     192                             
    193193    // XXX:
    194194    realN50NoMask = myStats->robustN50;
    195 
    196     printf("The expected N50 was %f; the calculated N50 was %f\n",
    197            realN50NoMask, myStats->robustN50);
    198     if (fabs(myStats->robustN50 - realN50NoMask) < (ERROR_TOLERANCE * realN50NoMask)) {
    199         testStatus = true;
    200     } else {
    201         testStatus = false;
    202         globalTestStatus = false;
    203     }
    204     printFooter(stdout,
    205                 "psVector functions",
    206                 "PS_STAT_ROBUST_STATS: robust N50: no vector mask",
    207                 testStatus);
    208 
    209 
    210 
    211     printPositiveTestHeader(stdout,
    212                             "psStats functions",
    213                             "PS_STAT_ROBUST_STATS: robust Nfit: no vector mask");
    214 
     195   
     196    printf( "The expected N50 was %.2f; the calculated N50 was %.2f\n",
     197            realN50NoMask, myStats->robustN50 );
     198    if ( fabs( myStats->robustN50 - realN50NoMask ) < ( ERROR_TOLERANCE * realN50NoMask ) ) {
     199            testStatus = true;
     200        } else {
     201            testStatus = false;
     202            globalTestStatus = false;
     203        }
     204    printFooter( stdout,
     205                 "psVector functions",
     206                 "PS_STAT_ROBUST_STATS: robust N50: no vector mask",
     207                 testStatus );
     208                 
     209                 
     210                 
     211    printPositiveTestHeader( stdout,
     212                             "psStats functions",
     213                             "PS_STAT_ROBUST_STATS: robust Nfit: no vector mask" );
     214                             
    215215    // XXX:
    216216    realNfitNoMask = myStats->robustNfit;
    217 
    218     printf("The expected Nfit was %f; the calculated Nfit was %f\n",
    219            realNfitNoMask, myStats->robustNfit);
    220     if (fabs(myStats->robustNfit - realNfitNoMask) < (ERROR_TOLERANCE * realNfitNoMask)) {
    221         testStatus = true;
    222     } else {
    223         testStatus = false;
    224         globalTestStatus = false;
    225     }
    226     printFooter(stdout,
    227                 "psVector functions",
    228                 "PS_STAT_ROBUST_STATS: robust Nfit: no vector mask",
    229                 testStatus);
    230 
    231 
    232     return(0);
    233 
     217   
     218    printf( "The expected Nfit was %.2f; the calculated Nfit was %.2f\n",
     219            realNfitNoMask, myStats->robustNfit );
     220    if ( fabs( myStats->robustNfit - realNfitNoMask ) < ( ERROR_TOLERANCE * realNfitNoMask ) ) {
     221            testStatus = true;
     222        } else {
     223            testStatus = false;
     224            globalTestStatus = false;
     225        }
     226    printFooter( stdout,
     227                 "psVector functions",
     228                 "PS_STAT_ROBUST_STATS: robust Nfit: no vector mask",
     229                 testStatus );
     230                 
     231                 
     232    return ( 0 );
     233   
    234234    /*************************************************************************/
    235235    /*  Call psVectorStats() with vector mask.                               */
    236236    /*************************************************************************/
    237     printPositiveTestHeader(stdout,
    238                             "psStats functions",
    239                             "PS_STAT_ROBUST_STATS: robust mean: with vector mask");
    240 
    241     printf("Calling psVectorStats() on a vector with elements masked.\n");
    242     myStats = psVectorStats(myStats, myVector, maskVector, 1);
    243     printf("Called psVectorStats() on a vector with elements masked.\n");
    244     printf("The expected Mean was %f; the calculated Mean was %f\n",
    245            realMeanWithMask, myStats->robustMean);
    246     if (fabs(myStats->robustMean - realMeanWithMask) < (ERROR_TOLERANCE * realMeanWithMask)) {
    247         testStatus = true;
    248     } else {
    249         testStatus = false;
    250         globalTestStatus = false;
    251     }
    252     printFooter(stdout,
    253                 "psVector functions",
    254                 "PS_STAT_ROBUST_STATS: robust mean: with vector mask",
    255                 testStatus);
    256 
    257 
    258 
    259     printPositiveTestHeader(stdout,
    260                             "psStats functions",
    261                             "PS_STAT_ROBUST_STATS: robust Median: with vector mask");
    262 
    263     printf("The expected Median was %f; the calculated Median was %f\n",
    264            realMedianWithMask, myStats->robustMedian);
    265     if (fabs(myStats->robustMedian - realMedianWithMask) < (ERROR_TOLERANCE * realMedianWithMask)) {
    266         testStatus = true;
    267     } else {
    268         testStatus = false;
    269         globalTestStatus = false;
    270     }
    271     printFooter(stdout,
    272                 "psVector functions",
    273                 "PS_STAT_ROBUST_STATS: robust Median: with vector mask",
    274                 testStatus);
    275 
    276 
    277 
    278     printPositiveTestHeader(stdout,
    279                             "psStats functions",
    280                             "PS_STAT_ROBUST_STATS: robust Mode: with vector mask");
    281 
    282     printf("The expected Mode was %f; the calculated Mode was %f\n",
    283            realModeWithMask, myStats->robustMode);
    284     if (fabs(myStats->robustMode - realModeWithMask) < (ERROR_TOLERANCE * realModeWithMask)) {
    285         testStatus = true;
    286     } else {
    287         testStatus = false;
    288         globalTestStatus = false;
    289     }
    290     printFooter(stdout,
    291                 "psVector functions",
    292                 "PS_STAT_ROBUST_STATS: robust Mode: with vector mask",
    293                 testStatus);
    294 
    295 
    296 
    297     printPositiveTestHeader(stdout,
    298                             "psStats functions",
    299                             "PS_STAT_ROBUST_STATS: robust Stdev: with vector mask");
    300 
    301     printf("The expected Stdev was %f; the calculated Stdev was %f\n",
    302            realStdevWithMask, myStats->robustStdev);
    303     if (fabs(myStats->robustStdev - realStdevWithMask) < (ERROR_TOLERANCE * realStdevWithMask)) {
    304         testStatus = true;
    305     } else {
    306         testStatus = false;
    307         globalTestStatus = false;
    308     }
    309     printFooter(stdout,
    310                 "psVector functions",
    311                 "PS_STAT_ROBUST_STATS: robust Stdev: with vector mask",
    312                 testStatus);
    313 
    314 
    315 
    316     printPositiveTestHeader(stdout,
    317                             "psStats functions",
    318                             "PS_STAT_ROBUST_STATS: lower quartile: with vector mask");
    319 
    320     printf("The expected LQ was %f; the calculated LQ was %f\n",
    321            realLQWithMask, myStats->robustLQ);
    322     if (fabs(myStats->robustLQ - realLQWithMask) < (ERROR_TOLERANCE * realLQWithMask)) {
    323         testStatus = true;
    324     } else {
    325         testStatus = false;
    326         globalTestStatus = false;
    327     }
    328     printFooter(stdout,
    329                 "psVector functions",
    330                 "PS_STAT_ROBUST_STATS: lower quartile: with vector mask",
    331                 testStatus);
    332 
    333 
    334 
    335     printPositiveTestHeader(stdout,
    336                             "psStats functions",
    337                             "PS_STAT_ROBUST_STATS: upper quartile: with vector mask");
    338 
    339     printf("The expected UQ was %f; the calculated UQ was %f\n",
    340            realUQWithMask, myStats->robustUQ);
    341     if (fabs(myStats->robustUQ - realUQWithMask) < (ERROR_TOLERANCE * realUQWithMask)) {
    342         testStatus = true;
    343     } else {
    344         testStatus = false;
    345         globalTestStatus = false;
    346     }
    347     printFooter(stdout,
    348                 "psVector functions",
    349                 "PS_STAT_ROBUST_STATS: lower quartile: with vector mask",
    350                 testStatus);
    351 
    352 
    353 
    354     printPositiveTestHeader(stdout,
    355                             "psStats functions",
    356                             "PS_STAT_ROBUST_STATS: robust N50: with vector mask");
    357 
    358     printf("The expected N50 was %f; the calculated N50 was %f\n",
    359            realN50WithMask, myStats->robustN50);
    360     if (fabs(myStats->robustN50 - realN50WithMask) < (ERROR_TOLERANCE * realN50WithMask)) {
    361         testStatus = true;
    362     } else {
    363         testStatus = false;
    364         globalTestStatus = false;
    365     }
    366     printFooter(stdout,
    367                 "psVector functions",
    368                 "PS_STAT_ROBUST_STATS: robust N50: with vector mask",
    369                 testStatus);
    370 
    371 
    372 
    373     printPositiveTestHeader(stdout,
    374                             "psStats functions",
    375                             "PS_STAT_ROBUST_STATS: robust Nfit: with vector mask");
    376 
    377     printf("The expected Nfit was %f; the calculated Nfit was %f\n",
    378            realNfitWithMask, myStats->robustNfit);
    379     if (fabs(myStats->robustNfit - realNfitWithMask) < (ERROR_TOLERANCE * realNfitWithMask)) {
    380         testStatus = true;
    381     } else {
    382         testStatus = false;
    383         globalTestStatus = false;
    384     }
    385     printFooter(stdout,
    386                 "psVector functions",
    387                 "PS_STAT_ROBUST_STATS: robust Nfit: with vector mask",
    388                 testStatus);
    389 
    390 
    391 
     237    printPositiveTestHeader( stdout,
     238                             "psStats functions",
     239                             "PS_STAT_ROBUST_STATS: robust mean: with vector mask" );
     240                             
     241    printf( "Calling psVectorStats() on a vector with elements masked.\n" );
     242    myStats = psVectorStats( myStats, myVector, maskVector, 1 );
     243    printf( "Called psVectorStats() on a vector with elements masked.\n" );
     244    printf( "The expected Mean was %.2f; the calculated Mean was %.2f\n",
     245            realMeanWithMask, myStats->robustMean );
     246    if ( fabs( myStats->robustMean - realMeanWithMask ) < ( ERROR_TOLERANCE * realMeanWithMask ) ) {
     247            testStatus = true;
     248        } else {
     249            testStatus = false;
     250            globalTestStatus = false;
     251        }
     252    printFooter( stdout,
     253                 "psVector functions",
     254                 "PS_STAT_ROBUST_STATS: robust mean: with vector mask",
     255                 testStatus );
     256                 
     257                 
     258                 
     259    printPositiveTestHeader( stdout,
     260                             "psStats functions",
     261                             "PS_STAT_ROBUST_STATS: robust Median: with vector mask" );
     262                             
     263    printf( "The expected Median was %.2f; the calculated Median was %.2f\n",
     264            realMedianWithMask, myStats->robustMedian );
     265    if ( fabs( myStats->robustMedian - realMedianWithMask ) < ( ERROR_TOLERANCE * realMedianWithMask ) ) {
     266            testStatus = true;
     267        } else {
     268            testStatus = false;
     269            globalTestStatus = false;
     270        }
     271    printFooter( stdout,
     272                 "psVector functions",
     273                 "PS_STAT_ROBUST_STATS: robust Median: with vector mask",
     274                 testStatus );
     275                 
     276                 
     277                 
     278    printPositiveTestHeader( stdout,
     279                             "psStats functions",
     280                             "PS_STAT_ROBUST_STATS: robust Mode: with vector mask" );
     281                             
     282    printf( "The expected Mode was %.2f; the calculated Mode was %.2f\n",
     283            realModeWithMask, myStats->robustMode );
     284    if ( fabs( myStats->robustMode - realModeWithMask ) < ( ERROR_TOLERANCE * realModeWithMask ) ) {
     285            testStatus = true;
     286        } else {
     287            testStatus = false;
     288            globalTestStatus = false;
     289        }
     290    printFooter( stdout,
     291                 "psVector functions",
     292                 "PS_STAT_ROBUST_STATS: robust Mode: with vector mask",
     293                 testStatus );
     294                 
     295                 
     296                 
     297    printPositiveTestHeader( stdout,
     298                             "psStats functions",
     299                             "PS_STAT_ROBUST_STATS: robust Stdev: with vector mask" );
     300                             
     301    printf( "The expected Stdev was %.2f; the calculated Stdev was %.2f\n",
     302            realStdevWithMask, myStats->robustStdev );
     303    if ( fabs( myStats->robustStdev - realStdevWithMask ) < ( ERROR_TOLERANCE * realStdevWithMask ) ) {
     304            testStatus = true;
     305        } else {
     306            testStatus = false;
     307            globalTestStatus = false;
     308        }
     309    printFooter( stdout,
     310                 "psVector functions",
     311                 "PS_STAT_ROBUST_STATS: robust Stdev: with vector mask",
     312                 testStatus );
     313                 
     314                 
     315                 
     316    printPositiveTestHeader( stdout,
     317                             "psStats functions",
     318                             "PS_STAT_ROBUST_STATS: lower quartile: with vector mask" );
     319                             
     320    printf( "The expected LQ was %.2f; the calculated LQ was %.2f\n",
     321            realLQWithMask, myStats->robustLQ );
     322    if ( fabs( myStats->robustLQ - realLQWithMask ) < ( ERROR_TOLERANCE * realLQWithMask ) ) {
     323            testStatus = true;
     324        } else {
     325            testStatus = false;
     326            globalTestStatus = false;
     327        }
     328    printFooter( stdout,
     329                 "psVector functions",
     330                 "PS_STAT_ROBUST_STATS: lower quartile: with vector mask",
     331                 testStatus );
     332                 
     333                 
     334                 
     335    printPositiveTestHeader( stdout,
     336                             "psStats functions",
     337                             "PS_STAT_ROBUST_STATS: upper quartile: with vector mask" );
     338                             
     339    printf( "The expected UQ was %.2f; the calculated UQ was %.2f\n",
     340            realUQWithMask, myStats->robustUQ );
     341    if ( fabs( myStats->robustUQ - realUQWithMask ) < ( ERROR_TOLERANCE * realUQWithMask ) ) {
     342            testStatus = true;
     343        } else {
     344            testStatus = false;
     345            globalTestStatus = false;
     346        }
     347    printFooter( stdout,
     348                 "psVector functions",
     349                 "PS_STAT_ROBUST_STATS: lower quartile: with vector mask",
     350                 testStatus );
     351                 
     352                 
     353                 
     354    printPositiveTestHeader( stdout,
     355                             "psStats functions",
     356                             "PS_STAT_ROBUST_STATS: robust N50: with vector mask" );
     357                             
     358    printf( "The expected N50 was %.2f; the calculated N50 was %.2f\n",
     359            realN50WithMask, myStats->robustN50 );
     360    if ( fabs( myStats->robustN50 - realN50WithMask ) < ( ERROR_TOLERANCE * realN50WithMask ) ) {
     361            testStatus = true;
     362        } else {
     363            testStatus = false;
     364            globalTestStatus = false;
     365        }
     366    printFooter( stdout,
     367                 "psVector functions",
     368                 "PS_STAT_ROBUST_STATS: robust N50: with vector mask",
     369                 testStatus );
     370                 
     371                 
     372                 
     373    printPositiveTestHeader( stdout,
     374                             "psStats functions",
     375                             "PS_STAT_ROBUST_STATS: robust Nfit: with vector mask" );
     376                             
     377    printf( "The expected Nfit was %.2f; the calculated Nfit was %.2f\n",
     378            realNfitWithMask, myStats->robustNfit );
     379    if ( fabs( myStats->robustNfit - realNfitWithMask ) < ( ERROR_TOLERANCE * realNfitWithMask ) ) {
     380            testStatus = true;
     381        } else {
     382            testStatus = false;
     383            globalTestStatus = false;
     384        }
     385    printFooter( stdout,
     386                 "psVector functions",
     387                 "PS_STAT_ROBUST_STATS: robust Nfit: with vector mask",
     388                 testStatus );
     389                 
     390                 
     391                 
    392392    /*************************************************************************/
    393393    /*  Deallocate data structures                                           */
    394394    /*************************************************************************/
    395     printPositiveTestHeader(stdout,
    396                             "psStats functions",
    397                             "psStats(): deallocating memory");
    398 
    399     psFree(myStats);
    400     psFree(myVector);
    401     psFree(maskVector);
    402 
    403     psMemCheckCorruption(1);
    404     memLeaks = psMemCheckLeaks(currentId,NULL,NULL);
    405     if (0 != memLeaks) {
    406         psAbort(__func__,"Memory Leaks! (%d leaks)", memLeaks);
    407     }
    408 
    409     printFooter(stdout,
    410                 "psVector functions",
    411                 "psStats(): deallocating memory",
    412                 testStatus);
    413 
    414     return (!globalTestStatus);
     395    printPositiveTestHeader( stdout,
     396                             "psStats functions",
     397                             "psStats(): deallocating memory" );
     398                             
     399    psFree( myStats );
     400    psFree( myVector );
     401    psFree( maskVector );
     402   
     403    psMemCheckCorruption( 1 );
     404    memLeaks = psMemCheckLeaks( currentId, NULL, NULL );
     405    if ( 0 != memLeaks ) {
     406            psAbort( __func__, "Memory Leaks! (%d leaks)", memLeaks );
     407        }
     408       
     409    printFooter( stdout,
     410                 "psVector functions",
     411                 "psStats(): deallocating memory",
     412                 testStatus );
     413                 
     414    return ( !globalTestStatus );
    415415}
  • trunk/psLib/test/dataManip/tst_psVectorFFT.c

    r1193 r1365  
    11/** @file  tst_psVectorFFT.c
    2  *
    3  *  @brief Contains the tests for psFFT.[ch]
    4  *
    5  *
    6  *  @author Robert DeSonia, MHPCC
    7  *
    8  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-07-08 01:05:01 $
    10  *
    11  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
    12  */
     2*
     3*  @brief Contains the tests for psFFT.[ch]
     4*
     5*
     6*  @author Robert DeSonia, MHPCC
     7*
     8*  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2004-08-02 19:43:23 $
     10*
     11*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     12*/
    1313
    1414#include <math.h>
     
    2121img = psImageAlloc(c,r,PS_TYPE_##TYP); \
    2222for (unsigned int row=0;row<r;row++) { \
    23     ps##TYP* imgRow = img->data.TYP[row]; \
    24     for (unsigned int col=0;col<c;col++) { \
    25         imgRow[col] = (ps##TYP)(valueFcn); \
    26     } \
    27 }
    28 
    29 static int testVectorFFT(void);
    30 static int testVectorRealImaginary(void);
    31 static int testVectorComplex(void);
    32 static int testVectorConjugate(void);
    33 static int testVectorPowerSpectrum(void);
     23        ps##TYP* imgRow = img->data.TYP[row]; \
     24        for (unsigned int col=0;col<c;col++) { \
     25                imgRow[col] = (ps##TYP)(valueFcn); \
     26            } \
     27    }
     28   
     29static int testVectorFFT( void );
     30static int testVectorRealImaginary( void );
     31static int testVectorComplex( void );
     32static int testVectorConjugate( void );
     33static int testVectorPowerSpectrum( void );
    3434
    3535testDescription tests[] = {
    36                               {testVectorFFT,600,"psVectorFFT",0,false},
    37                               {testVectorRealImaginary,601,"psVectorRealImaginary",0,false},
    38                               {testVectorComplex,602,"psVectorComplex",0,false},
    39                               {testVectorConjugate,603,"psVectorConjugate",0,false},
    40                               {testVectorPowerSpectrum,604,"psVectorPowerSpectrum",0,false},
    41                               {NULL}
     36                              {
     37                                  testVectorFFT, 600, "psVectorFFT", 0, false
     38                              },
     39                              {
     40                                  testVectorRealImaginary, 601, "psVectorRealImaginary", 0, false
     41                              },
     42                              {
     43                                  testVectorComplex, 602, "psVectorComplex", 0, false
     44                              },
     45                              {
     46                                  testVectorConjugate, 603, "psVectorConjugate", 0, false
     47                              },
     48                              {
     49                                  testVectorPowerSpectrum, 604, "psVectorPowerSpectrum", 0, false
     50                              },
     51                              {
     52                                  NULL
     53                              }
    4254                          };
    43 
    44 int main(int argc, char* argv[])
    45 {
    46     psLogSetLevel(PS_LOG_INFO);
    47 
    48     if (! runTestSuite(stderr,"psFFT",tests,argc,argv) ) {
    49         psAbort(__FILE__,"One or more tests failed");
    50     }
    51     return 0;
    52 }
    53 
    54 int testVectorFFT(void)
    55 {
    56     psVector* vec = NULL;
     55                         
     56int main( int argc, char* argv[] )
     57{
     58    psLogSetLevel( PS_LOG_INFO );
     59   
     60    return ( ! runTestSuite( stderr, "psFFT", tests, argc, argv ) );
     61}
     62
     63int testVectorFFT( void )
     64{
     65    psVector * vec = NULL;
    5766    psVector* vec2 = NULL;
    5867    psVector* vec3 = NULL;
    59 
     68   
    6069    /*
    6170    1. assign a vector to a sinisoid
     
    6574    5. compare to original (should be equal to within a reasonable error)
    6675    */
    67 
     76   
    6877    // 1. assign a vector to a sinisoid
    69     vec=psVectorAlloc(100,PS_TYPE_F32);
    70     vec->n = vec->nalloc;
    71     for (unsigned int n = 0; n<100; n++) {
    72         vec->data.F32[n] = sinf((psF32)n / 50.0f * M_PI);
    73     }
    74 
     78    vec = psVectorAlloc( 100, PS_TYPE_F32 );
     79    vec->n = vec->nalloc;
     80    for ( unsigned int n = 0; n < 100; n++ ) {
     81            vec->data.F32[ n ] = sinf( ( psF32 ) n / 50.0f * M_PI );
     82        }
     83       
    7584    // 2. perform a forward transform
    76     vec2 = psVectorFFT(NULL,vec,PS_FFT_FORWARD);
    77     if (vec2->type.type != PS_TYPE_C32) {
    78         psError(__func__,"FFT didn't produce complex values?");
    79         return 1;
    80     }
    81 
    82 
     85    vec2 = psVectorFFT( NULL, vec, PS_FFT_FORWARD );
     86    if ( vec2->type.type != PS_TYPE_C32 ) {
     87            psError( __func__, "FFT didn't produce complex values?" );
     88            return 1;
     89        }
     90       
     91       
    8392    // 3. verify that the only significant component cooresponds to the freqency of the input in step 1.
    84     for (unsigned int n = 0; n<100; n++) {
    85         if (n==1 || n==99) {
    86             if (fabsf(cabsf(vec2->data.C32[n]) - 50.0f) > 0.1f) {
    87                 psError(__func__,"FFT didn't work for vector (n=%d)",n);
    88                 return 2;
    89             }
    90         } else {
    91             if (fabsf(cabsf(vec2->data.C32[n])) > 0.1f) {
    92                 psError(__func__,"FFT didn't work for vector (n=%d)",n);
    93                 return 3;
    94             }
    95         }
    96     }
    97 
     93    for ( unsigned int n = 0; n < 100; n++ ) {
     94            if ( n == 1 || n == 99 ) {
     95                    if ( fabsf( cabsf( vec2->data.C32[ n ] ) - 50.0f ) > 0.1f ) {
     96                            psError( __func__, "FFT didn't work for vector (n=%d)", n );
     97                            return 2;
     98                        }
     99                } else {
     100                    if ( fabsf( cabsf( vec2->data.C32[ n ] ) ) > 0.1f ) {
     101                            psError( __func__, "FFT didn't work for vector (n=%d)", n );
     102                            return 3;
     103                        }
     104                }
     105        }
     106       
    98107    // 4. perform a reverse transform
    99     vec3 = psVectorFFT(NULL,vec2,PS_FFT_REVERSE);
    100     if (vec3->type.type != PS_TYPE_C32) {
    101         psError(__func__,"FFT didn't produce complex values?");
    102         return 4;
    103     }
    104     for (unsigned int n = 0; n<100; n++) {
    105         psF32 val =sinf((psF32)n / 50.0f * M_PI);
    106         psF32 vecVal = crealf(vec3->data.C32[n])/100;
    107         if (fabsf(vecVal - val) > 0.1f) {
    108             psError(__func__,"Reverse FFT didn't give me the original vector back (n=%d) (%.2f vs %.2f)",
    109                     n,vecVal,val);
    110             return 5;
    111         }
    112     }
    113 
    114     psFree(vec);
    115     psFree(vec2);
    116     psFree(vec3);
    117 
    118     return 0;
    119 }
    120 
    121 int testVectorRealImaginary(void)
    122 {
    123     psVector* vec = NULL;
     108    vec3 = psVectorFFT( NULL, vec2, PS_FFT_REVERSE );
     109    if ( vec3->type.type != PS_TYPE_C32 ) {
     110            psError( __func__, "FFT didn't produce complex values?" );
     111            return 4;
     112        }
     113    for ( unsigned int n = 0; n < 100; n++ ) {
     114            psF32 val = sinf( ( psF32 ) n / 50.0f * M_PI );
     115            psF32 vecVal = crealf( vec3->data.C32[ n ] ) / 100;
     116            if ( fabsf( vecVal - val ) > 0.1f ) {
     117                    psError( __func__, "Reverse FFT didn't give me the original vector back (n=%d) (%.2f vs %.2f)",
     118                             n, vecVal, val );
     119                    return 5;
     120                }
     121        }
     122       
     123    psFree( vec );
     124    psFree( vec2 );
     125    psFree( vec3 );
     126   
     127    return 0;
     128}
     129
     130int testVectorRealImaginary( void )
     131{
     132    psVector * vec = NULL;
    124133    psVector* vec2 = NULL;
    125134    psVector* vec3 = NULL;
    126 
     135   
    127136    /*
    128137    1. create a C32 complex vector with distinctly different real and imaginary parts.
     
    130139    3. compare results to the real/imaginary components of input
    131140    */
    132 
     141   
    133142    // 1. create a C32 complex vector with distinctly different real and imaginary parts.
    134     vec=psVectorAlloc(100,PS_TYPE_C32);
    135     vec->n = vec->nalloc;
    136     for (unsigned int n = 0; n<100; n++) {
    137         vec->data.C32[n] = n + I * (n*2);
    138     }
    139 
     143    vec = psVectorAlloc( 100, PS_TYPE_C32 );
     144    vec->n = vec->nalloc;
     145    for ( unsigned int n = 0; n < 100; n++ ) {
     146            vec->data.C32[ n ] = n + I * ( n * 2 );
     147        }
     148       
    140149    // 2. call psVectorReal and psVectorImaginary
    141     vec2 = psVectorReal(vec2,vec);
    142     if (vec2 == NULL) {
    143         psError(__func__,"psVectorReal returned a NULL?");
    144         return 1;
    145     }
    146     if (vec2->type.type != PS_TYPE_F32) {
    147         psError(__func__,"psVectorReal returned a wrong type (%d)?",
    148                 vec2->type.type);
    149         return 2;
    150     }
    151 
    152     vec3 = psVectorImaginary(vec3,vec);
    153     if (vec3 == NULL) {
    154         psError(__func__,"psVectorImaginary returned a NULL?");
    155         return 3;
    156     }
    157     if (vec3->type.type != PS_TYPE_F32) {
    158         psError(__func__,"psVectorImaginary returned a wrong type (%d)?",
    159                 vec3->type.type);
    160         return 4;
    161     }
    162 
     150    vec2 = psVectorReal( vec2, vec );
     151    if ( vec2 == NULL ) {
     152            psError( __func__, "psVectorReal returned a NULL?" );
     153            return 1;
     154        }
     155    if ( vec2->type.type != PS_TYPE_F32 ) {
     156            psError( __func__, "psVectorReal returned a wrong type (%d)?",
     157                     vec2->type.type );
     158            return 2;
     159        }
     160       
     161    vec3 = psVectorImaginary( vec3, vec );
     162    if ( vec3 == NULL ) {
     163            psError( __func__, "psVectorImaginary returned a NULL?" );
     164            return 3;
     165        }
     166    if ( vec3->type.type != PS_TYPE_F32 ) {
     167            psError( __func__, "psVectorImaginary returned a wrong type (%d)?",
     168                     vec3->type.type );
     169            return 4;
     170        }
     171       
    163172    // 3. compare results to the real/imaginary components of input
    164     for (unsigned int n = 0; n<100; n++) {
    165         psF32 r = n;
    166         psF32 i = (n*2);
    167         if (fabsf(vec2->data.F32[n] -r) > FLT_EPSILON) {
    168             psError(__func__,"psVectorReal didn't return the real portion at n=%d",
    169                     n);
    170             return 5;
    171         }
    172         if (fabsf(vec3->data.F32[n] -i) > FLT_EPSILON) {
    173             psError(__func__,"psVectorImaginary didn't return the real portion at n=%d",
    174                     n);
    175             return 6;
    176         }
    177     }
    178 
    179     psFree(vec);
    180     psFree(vec2);
    181     psFree(vec3);
    182 
    183     return 0;
    184 }
    185 
    186 int testVectorComplex(void)
    187 {
    188     psVector* vec = NULL;
     173    for ( unsigned int n = 0; n < 100; n++ ) {
     174            psF32 r = n;
     175            psF32 i = ( n * 2 );
     176            if ( fabsf( vec2->data.F32[ n ] - r ) > FLT_EPSILON ) {
     177                    psError( __func__, "psVectorReal didn't return the real portion at n=%d",
     178                             n );
     179                    return 5;
     180                }
     181            if ( fabsf( vec3->data.F32[ n ] - i ) > FLT_EPSILON ) {
     182                    psError( __func__, "psVectorImaginary didn't return the real portion at n=%d",
     183                             n );
     184                    return 6;
     185                }
     186        }
     187       
     188    psFree( vec );
     189    psFree( vec2 );
     190    psFree( vec3 );
     191   
     192    return 0;
     193}
     194
     195int testVectorComplex( void )
     196{
     197    psVector * vec = NULL;
    189198    psVector* vec2 = NULL;
    190199    psVector* vec3 = NULL;
    191 
     200   
    192201    /*
    193202    1. create two unique psF32 vectors of the same size
     
    196205    4. call psVectorReal and psVectorImaginary on step 2 results
    197206    5. compare step 4 results to input.
    198 
     207   
    199208    6. create a psF32 and a psF64 vector of the same size
    200209    7. call psVectorComplex
    201210    8. verify that an appropriate error occurred.
    202 
     211   
    203212    9. create two psf32 vectors of different sizes
    204213    10. call psVectorComplex
    205214    11. verify thet an appropriate error occurred.
    206215    */
    207 
     216   
    208217    // 1. create two unique psF32 vectors of the same size
    209     vec=psVectorAlloc(100,PS_TYPE_F32);
    210     vec2=psVectorAlloc(100,PS_TYPE_F32);
     218    vec = psVectorAlloc( 100, PS_TYPE_F32 );
     219    vec2 = psVectorAlloc( 100, PS_TYPE_F32 );
    211220    vec->n = vec->nalloc;
    212221    vec2->n = vec2->nalloc;
    213     for (unsigned int n = 0; n<100; n++) {
    214         vec->data.F32[n] = n;
    215         vec2->data.F32[n] = (n*2);
    216     }
    217 
     222    for ( unsigned int n = 0; n < 100; n++ ) {
     223            vec->data.F32[ n ] = n;
     224            vec2->data.F32[ n ] = ( n * 2 );
     225        }
     226       
    218227    // 2. call psVectorComplex
    219     vec3 = psVectorComplex(vec3,vec,vec2);
    220 
     228    vec3 = psVectorComplex( vec3, vec, vec2 );
     229   
    221230    // 3. verify that the result is a psC32
    222     if (vec3->type.type != PS_TYPE_C32) {
    223         psError(__func__,"Vector Type from psVectorComplex is not complex? (%d)",
    224                 vec3->type.type);
    225         return 1;
    226     }
    227 
     231    if ( vec3->type.type != PS_TYPE_C32 ) {
     232            psError( __func__, "Vector Type from psVectorComplex is not complex? (%d)",
     233                     vec3->type.type );
     234            return 1;
     235        }
     236       
    228237    // 4. call psVectorReal and psVectorImaginary on step 2 results (not needed, just use crealf/cimagf)
    229238    // 5. compare step 4 results to input.
    230     for (unsigned int n = 0; n<100; n++) {
    231         if (fabsf(crealf(vec3->data.C32[n]) - n) > FLT_EPSILON ||
    232                 fabsf(cimagf(vec3->data.C32[n]) - (n*2)) > FLT_EPSILON) {
    233             psError(__func__,"psVectorComplex result is invalid (n=%d, %.2f+%.2fi)",
    234                     n,crealf(vec3->data.C32[n]),cimagf(vec3->data.C32[n]));
    235             return 2;
    236         };
    237     }
    238 
    239 
     239    for ( unsigned int n = 0; n < 100; n++ ) {
     240            if ( fabsf( crealf( vec3->data.C32[ n ] ) - n ) > FLT_EPSILON ||
     241                    fabsf( cimagf( vec3->data.C32[ n ] ) - ( n * 2 ) ) > FLT_EPSILON ) {
     242                    psError( __func__, "psVectorComplex result is invalid (n=%d, %.2f+%.2fi)",
     243                             n, crealf( vec3->data.C32[ n ] ), cimagf( vec3->data.C32[ n ] ) );
     244                    return 2;
     245                };
     246        }
     247       
     248       
    240249    // 6. create a psF32 and a psF64 vector of the same size
    241     vec2 = psVectorRecycle(vec2,PS_TYPE_F64, 100);
    242 
     250    vec2 = psVectorRecycle( vec2, PS_TYPE_F64, 100 );
     251   
    243252    // 7. call psVectorComplex
    244     psLogMsg(__func__,PS_LOG_INFO, "Following should be an error (type mismatch).");
    245     vec3 = psVectorComplex(vec3,vec,vec2);
     253    psLogMsg( __func__, PS_LOG_INFO, "Following should be an error (type mismatch)." );
     254    vec3 = psVectorComplex( vec3, vec, vec2 );
    246255    // 8. verify that an appropriate error occurred. (this partially has to be done via inspection)
    247     if (vec3 != NULL) {
    248         psError(__func__,"psVectorComplex returned a vector though input types mismatched.");
    249         return 3;
    250     }
    251 
     256    if ( vec3 != NULL ) {
     257            psError( __func__, "psVectorComplex returned a vector though input types mismatched." );
     258            return 3;
     259        }
     260       
    252261    // 9. create two psf32 vectors of different sizes
    253     vec2 = psVectorRecycle(vec2,PS_TYPE_F32,200);
    254 
     262    vec2 = psVectorRecycle( vec2, PS_TYPE_F32, 200 );
     263   
    255264    // 10. call psVectorComplex
    256     vec3 = psVectorComplex(vec3,vec,vec2);
    257 
     265    vec3 = psVectorComplex( vec3, vec, vec2 );
     266   
    258267    // 11. verify thet an appropriate error occurred. (actually, it isn't an error...)
    259     if (vec3->n != 100) {
    260         psError(__func__,"psVectorComplex returned a vector though input sizes mismatched.");
    261         return 4;
    262     }
    263 
    264     psFree(vec);
    265     psFree(vec2);
    266     psFree(vec3);
    267 
    268     return 0;
    269 }
    270 
    271 int testVectorConjugate(void)
    272 {
    273     psVector* vec = NULL;
    274     psVector* vec2 = NULL;
    275 
     268    if ( vec3->n != 100 ) {
     269            psError( __func__, "psVectorComplex returned a larger vector than the input supported (%d).", vec3->n );
     270            return 4;
     271        }
     272       
     273    psFree( vec );
     274    psFree( vec2 );
     275    psFree( vec3 );
     276   
     277    return 0;
     278}
     279
     280int testVectorConjugate( void )
     281{
     282    psVector * vec = NULL;
     283    psVector* vec2 = NULL;
     284   
    276285    /*
    277286    1. create a psC32 with unique real and imaginary values.
     
    280289    4. verify each value is conjugate of input (a+bi -> a-bi)
    281290    */
    282 
     291   
    283292    // 1. create a psC32 with unique real and imaginary values.
    284     vec=psVectorAlloc(100,PS_TYPE_C32);
    285     vec->n = vec->nalloc;
    286     for (unsigned int n = 0; n<100; n++) {
    287         vec->data.C32[n] = n + I * (n*2);
    288     }
    289 
     293    vec = psVectorAlloc( 100, PS_TYPE_C32 );
     294    vec->n = vec->nalloc;
     295    for ( unsigned int n = 0; n < 100; n++ ) {
     296            vec->data.C32[ n ] = n + I * ( n * 2 );
     297        }
     298       
    290299    // 2. call psVectorConjugate
    291     vec2 = psVectorConjugate(vec2,vec);
    292 
     300    vec2 = psVectorConjugate( vec2, vec );
     301   
    293302    // 3. verify result is psC32
    294     if (vec2->type.type != PS_TYPE_C32) {
    295         psError(__func__,"the psVectorConjugate didn't return a C32 vector");
    296         return 1;
    297     }
    298 
     303    if ( vec2->type.type != PS_TYPE_C32 ) {
     304            psError( __func__, "the psVectorConjugate didn't return a C32 vector" );
     305            return 1;
     306        }
     307       
    299308    // 4. verify each value is conjugate of input (a+bi -> a-bi)
    300     for (unsigned int n = 0; n<100; n++) {
    301         if (fabsf(crealf(vec->data.C32[n]) - crealf(vec2->data.C32[n])) > FLT_EPSILON ||
    302                 fabsf(cimagf(vec->data.C32[n]) + cimagf(vec2->data.C32[n])) > FLT_EPSILON) {
    303             psError(__func__,"psVectorComplex result is invalid (n=%d, %.2f+%.2fi)",
    304                     n,crealf(vec2->data.C32[n]),cimagf(vec2->data.C32[n]));
    305             return 2;
    306         };
    307     }
    308 
    309     psFree(vec);
    310     psFree(vec2);
    311 
    312     return 0;
    313 }
    314 
    315 int testVectorPowerSpectrum(void)
    316 {
    317     psVector* vec = NULL;
     309    for ( unsigned int n = 0; n < 100; n++ ) {
     310            if ( fabsf( crealf( vec->data.C32[ n ] ) - crealf( vec2->data.C32[ n ] ) ) > FLT_EPSILON ||
     311                    fabsf( cimagf( vec->data.C32[ n ] ) + cimagf( vec2->data.C32[ n ] ) ) > FLT_EPSILON ) {
     312                    psError( __func__, "psVectorComplex result is invalid (n=%d, %.2f+%.2fi)",
     313                             n, crealf( vec2->data.C32[ n ] ), cimagf( vec2->data.C32[ n ] ) );
     314                    return 2;
     315                };
     316        }
     317       
     318    psFree( vec );
     319    psFree( vec2 );
     320   
     321    return 0;
     322}
     323
     324int testVectorPowerSpectrum( void )
     325{
     326    psVector * vec = NULL;
    318327    psVector* vec2 = NULL;
    319328    psF32 val;
    320 
     329   
    321330    /*
    322331    1. create a psC32 vector with unique real and imaginary components
     
    325334    4. verify the values are the square of the absolute values of the original
    326335    */
    327 
     336   
    328337    // 1. create a psC32 vector with unique real and imaginary components
    329     vec=psVectorAlloc(100,PS_TYPE_C32);
    330     vec->n = vec->nalloc;
    331     for (unsigned int n = 0; n<100; n++) {
    332         vec->data.C32[n] = n + I * sinf(((psF32)n) / 50.f * M_PI);
    333     }
    334 
     338    vec = psVectorAlloc( 100, PS_TYPE_C32 );
     339    vec->n = vec->nalloc;
     340    for ( unsigned int n = 0; n < 100; n++ ) {
     341            vec->data.C32[ n ] = n + I * sinf( ( ( psF32 ) n ) / 50.f * M_PI );
     342        }
     343       
    335344    // 2. call psVectorPowerSpectrum
    336     vec2 = psVectorPowerSpectrum(vec2,vec);
    337 
     345    vec2 = psVectorPowerSpectrum( vec2, vec );
     346   
    338347    // 3. verify result is psF32
    339     if (vec2->type.type != PS_TYPE_F32) {
    340         psError(__func__,"the type was not PS_TYPE_F32.");
    341         return 1;
    342     }
    343 
     348    if ( vec2->type.type != PS_TYPE_F32 ) {
     349            psError( __func__, "the type was not PS_TYPE_F32." );
     350            return 1;
     351        }
     352       
    344353    // 4. verify the values are the square of the absolute values of the original
    345354    //   (ADD specifies something else)
     
    348357    //   P_N/2 = |C_N/2|^2/N^2
    349358    //  where j = 1,2,...,(N/2-1)
    350 
    351     val = cabsf(vec->data.C32[0])*cabsf(vec->data.C32[0])/100/100;
    352     if (fabsf(vec2->data.F32[0] - val) > FLT_EPSILON) {
    353         psError(__func__,"psVectorPowerSpectrum result is invalid (n=0, %.2f %.2f)",
    354                 vec2->data.F32[0],val);
    355         return 2;
    356     };
    357 
    358     for (unsigned int n = 1; n<50; n++) {
    359         val = ( cabsf(vec->data.C32[n])*cabsf(vec->data.C32[n])+
    360                 cabsf(vec->data.C32[100-n])*cabsf(vec->data.C32[100-n]) ) /100/100;
    361 
    362         if (fabsf(val - vec2->data.F32[n]) > FLT_EPSILON) {
    363             psError(__func__,"psVectorPowerSpectrum result is invalid (n=%d, %.2f %.2f)",
    364                     n,vec2->data.F32[n],val);
     359   
     360    val = cabsf( vec->data.C32[ 0 ] ) * cabsf( vec->data.C32[ 0 ] ) / 100 / 100;
     361    if ( fabsf( vec2->data.F32[ 0 ] - val ) > FLT_EPSILON ) {
     362            psError( __func__, "psVectorPowerSpectrum result is invalid (n=0, %.2f %.2f)",
     363                     vec2->data.F32[ 0 ], val );
    365364            return 2;
    366365        };
    367     }
    368 
    369     val = cabsf(vec->data.C32[50])*cabsf(vec->data.C32[50])/100/100;
    370     if (fabsf(vec2->data.F32[50] - val) > FLT_EPSILON) {
    371         psError(__func__,"psVectorPowerSpectrum result is invalid (n=50, %.2f %.2f)",
    372                 vec2->data.F32[0],val);
    373         return 2;
    374     };
    375 
    376     psFree(vec);
    377     psFree(vec2);
    378 
    379     return 0;
    380 }
     366       
     367    for ( unsigned int n = 1; n < 50; n++ ) {
     368            val = ( cabsf( vec->data.C32[ n ] ) * cabsf( vec->data.C32[ n ] ) +
     369                    cabsf( vec->data.C32[ 100 - n ] ) * cabsf( vec->data.C32[ 100 - n ] ) ) / 100 / 100;
     370                   
     371            if ( fabsf( val - vec2->data.F32[ n ] ) > FLT_EPSILON ) {
     372                    psError( __func__, "psVectorPowerSpectrum result is invalid (n=%d, %.2f %.2f)",
     373                             n, vec2->data.F32[ n ], val );
     374                    return 2;
     375                };
     376        }
     377       
     378    val = cabsf( vec->data.C32[ 50 ] ) * cabsf( vec->data.C32[ 50 ] ) / 100 / 100;
     379    if ( fabsf( vec2->data.F32[ 50 ] - val ) > FLT_EPSILON ) {
     380            psError( __func__, "psVectorPowerSpectrum result is invalid (n=50, %.2f %.2f)",
     381                     vec2->data.F32[ 0 ], val );
     382            return 2;
     383        };
     384       
     385    psFree( vec );
     386    psFree( vec2 );
     387   
     388    return 0;
     389}
  • trunk/psLib/test/dataManip/verified/tst_psHist02.stdout

    r1323 r1365  
    55\**********************************************************************************/
    66
    7 Bin number 0 bounds: (20.000000 - 30.000000) data (10000)
     7Bin number 0 bounds: (20.00 - 30.00) data (10000)
    88
    99---> TESTPOINT PASSED (psStats functions{Allocate and Perform Histogram, no mask} | tst_psHist02.c)
     
    2525\**********************************************************************************/
    2626
    27 Bin number 0 bounds: (20.000000 - 25.000000) data (5000)
    28 Bin number 1 bounds: (25.000000 - 30.000000) data (5000)
     27Bin number 0 bounds: (20.00 - 25.00) data (5000)
     28Bin number 1 bounds: (25.00 - 30.00) data (5000)
    2929
    3030---> TESTPOINT PASSED (psStats functions{Allocate and Perform Histogram, no mask} | tst_psHist02.c)
     
    4747\**********************************************************************************/
    4848
    49 Bin number 0 bounds: (20.000000 - 21.000000) data (1000)
    50 Bin number 1 bounds: (21.000000 - 22.000000) data (1000)
    51 Bin number 2 bounds: (22.000000 - 23.000000) data (1000)
    52 Bin number 3 bounds: (23.000000 - 24.000000) data (1000)
    53 Bin number 4 bounds: (24.000000 - 25.000000) data (1000)
    54 Bin number 5 bounds: (25.000000 - 26.000000) data (1000)
    55 Bin number 6 bounds: (26.000000 - 27.000000) data (1000)
    56 Bin number 7 bounds: (27.000000 - 28.000000) data (1000)
    57 Bin number 8 bounds: (28.000000 - 29.000002) data (1000)
    58 Bin number 9 bounds: (29.000002 - 30.000002) data (1000)
     49Bin number 0 bounds: (20.00 - 21.00) data (1000)
     50Bin number 1 bounds: (21.00 - 22.00) data (1000)
     51Bin number 2 bounds: (22.00 - 23.00) data (1000)
     52Bin number 3 bounds: (23.00 - 24.00) data (1000)
     53Bin number 4 bounds: (24.00 - 25.00) data (1000)
     54Bin number 5 bounds: (25.00 - 26.00) data (1000)
     55Bin number 6 bounds: (26.00 - 27.00) data (1000)
     56Bin number 7 bounds: (27.00 - 28.00) data (1000)
     57Bin number 8 bounds: (28.00 - 29.00) data (1000)
     58Bin number 9 bounds: (29.00 - 30.00) data (1000)
    5959
    6060---> TESTPOINT PASSED (psStats functions{Allocate and Perform Histogram, no mask} | tst_psHist02.c)
     
    8585\**********************************************************************************/
    8686
    87 Bin number 0 bounds: (20.000000 - 20.500000) data (500)
    88 Bin number 1 bounds: (20.500000 - 21.000000) data (500)
    89 Bin number 2 bounds: (21.000000 - 21.500000) data (500)
    90 Bin number 3 bounds: (21.500000 - 22.000000) data (500)
    91 Bin number 4 bounds: (22.000000 - 22.500000) data (500)
    92 Bin number 5 bounds: (22.500000 - 23.000000) data (500)
    93 Bin number 6 bounds: (23.000000 - 23.500000) data (500)
    94 Bin number 7 bounds: (23.500000 - 24.000000) data (500)
    95 Bin number 8 bounds: (24.000000 - 24.500002) data (500)
    96 Bin number 9 bounds: (24.500002 - 25.000002) data (500)
    97 Bin number 10 bounds: (25.000002 - 25.500002) data (500)
    98 Bin number 11 bounds: (25.500002 - 26.000002) data (500)
    99 Bin number 12 bounds: (26.000002 - 26.500002) data (500)
    100 Bin number 13 bounds: (26.500002 - 27.000002) data (500)
    101 Bin number 14 bounds: (27.000002 - 27.500002) data (500)
    102 Bin number 15 bounds: (27.500002 - 28.000002) data (500)
    103 Bin number 16 bounds: (28.000002 - 28.500002) data (500)
    104 Bin number 17 bounds: (28.500002 - 29.000002) data (500)
    105 Bin number 18 bounds: (29.000002 - 29.500002) data (500)
    106 Bin number 19 bounds: (29.500002 - 30.000002) data (500)
     87Bin number 0 bounds: (20.00 - 20.50) data (500)
     88Bin number 1 bounds: (20.50 - 21.00) data (500)
     89Bin number 2 bounds: (21.00 - 21.50) data (500)
     90Bin number 3 bounds: (21.50 - 22.00) data (500)
     91Bin number 4 bounds: (22.00 - 22.50) data (500)
     92Bin number 5 bounds: (22.50 - 23.00) data (500)
     93Bin number 6 bounds: (23.00 - 23.50) data (500)
     94Bin number 7 bounds: (23.50 - 24.00) data (500)
     95Bin number 8 bounds: (24.00 - 24.50) data (500)
     96Bin number 9 bounds: (24.50 - 25.00) data (500)
     97Bin number 10 bounds: (25.00 - 25.50) data (500)
     98Bin number 11 bounds: (25.50 - 26.00) data (500)
     99Bin number 12 bounds: (26.00 - 26.50) data (500)
     100Bin number 13 bounds: (26.50 - 27.00) data (500)
     101Bin number 14 bounds: (27.00 - 27.50) data (500)
     102Bin number 15 bounds: (27.50 - 28.00) data (500)
     103Bin number 16 bounds: (28.00 - 28.50) data (500)
     104Bin number 17 bounds: (28.50 - 29.00) data (500)
     105Bin number 18 bounds: (29.00 - 29.50) data (500)
     106Bin number 19 bounds: (29.50 - 30.00) data (500)
    107107
    108108---> TESTPOINT PASSED (psStats functions{Allocate and Perform Histogram, no mask} | tst_psHist02.c)
  • trunk/psLib/test/dataManip/verified/tst_psMatrixVectorArithmetic02.stdout

    r1246 r1365  
    3131Operation: abs
    3232Input:
    33 -10.000000 -10.000000
    34 -10.000000 -10.000000
    35 -10.000000 -10.000000
    36 
    37 0.000000 0.000000
    38 0.000000 0.000000
    39 0.000000 0.000000
    40 
    41 Output:
    42 10.000000 10.000000
    43 10.000000 10.000000
    44 10.000000 10.000000
     33-10.00 -10.00
     34-10.00 -10.00
     35-10.00 -10.00
     36
     370.00 0.00
     380.00 0.00
     390.00 0.00
     40
     41Output:
     4210.00 10.00
     4310.00 10.00
     4410.00 10.00
    4545
    4646
     
    5555Operation: abs
    5656Input:
    57 -10.000000 -10.000000
    58 -10.000000 -10.000000
    59 -10.000000 -10.000000
    60 
    61 0.000000 0.000000
    62 0.000000 0.000000
    63 0.000000 0.000000
    64 
    65 Output:
    66 10.000000 10.000000
    67 10.000000 10.000000
    68 10.000000 10.000000
     57-10.00 -10.00
     58-10.00 -10.00
     59-10.00 -10.00
     60
     610.00 0.00
     620.00 0.00
     630.00 0.00
     64
     65Output:
     6610.00 10.00
     6710.00 10.00
     6810.00 10.00
    6969
    7070
     
    7979Operation: abs
    8080Input:
    81 -10.000000+-10.000000i -10.000000+-10.000000i
    82 -10.000000+-10.000000i -10.000000+-10.000000i
    83 -10.000000+-10.000000i -10.000000+-10.000000i
    84 
    85 0.000000+0.000000i 0.000000+0.000000i
    86 0.000000+0.000000i 0.000000+0.000000i
    87 0.000000+0.000000i 0.000000+0.000000i
    88 
    89 Output:
    90 14.142136+0.000000i 14.142136+0.000000i
    91 14.142136+0.000000i 14.142136+0.000000i
    92 14.142136+0.000000i 14.142136+0.000000i
     81-10.00-10.00i -10.00-10.00i
     82-10.00-10.00i -10.00-10.00i
     83-10.00-10.00i -10.00-10.00i
     84
     850.00+0.00i 0.00+0.00i
     860.00+0.00i 0.00+0.00i
     870.00+0.00i 0.00+0.00i
     88
     89Output:
     9014.14+0.00i 14.14+0.00i
     9114.14+0.00i 14.14+0.00i
     9214.14+0.00i 14.14+0.00i
    9393
    9494
     
    127127Operation: exp
    128128Input:
    129 10.000000 10.000000
    130 10.000000 10.000000
    131 10.000000 10.000000
    132 
    133 0.000000 0.000000
    134 0.000000 0.000000
    135 0.000000 0.000000
    136 
    137 Output:
    138 22026.464844 22026.464844
    139 22026.464844 22026.464844
    140 22026.464844 22026.464844
     12910.00 10.00
     13010.00 10.00
     13110.00 10.00
     132
     1330.00 0.00
     1340.00 0.00
     1350.00 0.00
     136
     137Output:
     13822026.46 22026.46
     13922026.46 22026.46
     14022026.46 22026.46
    141141
    142142
     
    151151Operation: exp
    152152Input:
    153 10.000000 10.000000
    154 10.000000 10.000000
    155 10.000000 10.000000
    156 
    157 0.000000 0.000000
    158 0.000000 0.000000
    159 0.000000 0.000000
    160 
    161 Output:
    162 22026.465795 22026.465795
    163 22026.465795 22026.465795
    164 22026.465795 22026.465795
     15310.00 10.00
     15410.00 10.00
     15510.00 10.00
     156
     1570.00 0.00
     1580.00 0.00
     1590.00 0.00
     160
     161Output:
     16222026.47 22026.47
     16322026.47 22026.47
     16422026.47 22026.47
    165165
    166166
     
    175175Operation: exp
    176176Input:
    177 10.000000+10.000000i 10.000000+10.000000i
    178 10.000000+10.000000i 10.000000+10.000000i
    179 10.000000+10.000000i 10.000000+10.000000i
    180 
    181 0.000000+0.000000i 0.000000+0.000000i
    182 0.000000+0.000000i 0.000000+0.000000i
    183 0.000000+0.000000i 0.000000+0.000000i
    184 
    185 Output:
    186 -18481.781250+-11982.862305i -18481.781250+-11982.862305i
    187 -18481.781250+-11982.862305i -18481.781250+-11982.862305i
    188 -18481.781250+-11982.862305i -18481.781250+-11982.862305i
     17710.00+10.00i 10.00+10.00i
     17810.00+10.00i 10.00+10.00i
     17910.00+10.00i 10.00+10.00i
     180
     1810.00+0.00i 0.00+0.00i
     1820.00+0.00i 0.00+0.00i
     1830.00+0.00i 0.00+0.00i
     184
     185Output:
     186-18481.78-11982.86i -18481.78-11982.86i
     187-18481.78-11982.86i -18481.78-11982.86i
     188-18481.78-11982.86i -18481.78-11982.86i
    189189
    190190
     
    223223Operation: ln
    224224Input:
    225 10.000000 10.000000
    226 10.000000 10.000000
    227 10.000000 10.000000
    228 
    229 0.000000 0.000000
    230 0.000000 0.000000
    231 0.000000 0.000000
    232 
    233 Output:
    234 2.302585 2.302585
    235 2.302585 2.302585
    236 2.302585 2.302585
     22510.00 10.00
     22610.00 10.00
     22710.00 10.00
     228
     2290.00 0.00
     2300.00 0.00
     2310.00 0.00
     232
     233Output:
     2342.30 2.30
     2352.30 2.30
     2362.30 2.30
    237237
    238238
     
    247247Operation: ln
    248248Input:
    249 10.000000 10.000000
    250 10.000000 10.000000
    251 10.000000 10.000000
    252 
    253 0.000000 0.000000
    254 0.000000 0.000000
    255 0.000000 0.000000
    256 
    257 Output:
    258 2.302585 2.302585
    259 2.302585 2.302585
    260 2.302585 2.302585
     24910.00 10.00
     25010.00 10.00
     25110.00 10.00
     252
     2530.00 0.00
     2540.00 0.00
     2550.00 0.00
     256
     257Output:
     2582.30 2.30
     2592.30 2.30
     2602.30 2.30
    261261
    262262
     
    271271Operation: ln
    272272Input:
    273 10.000000+10.000000i 10.000000+10.000000i
    274 10.000000+10.000000i 10.000000+10.000000i
    275 10.000000+10.000000i 10.000000+10.000000i
    276 
    277 0.000000+0.000000i 0.000000+0.000000i
    278 0.000000+0.000000i 0.000000+0.000000i
    279 0.000000+0.000000i 0.000000+0.000000i
    280 
    281 Output:
    282 2.649159+0.785398i 2.649159+0.785398i
    283 2.649159+0.785398i 2.649159+0.785398i
    284 2.649159+0.785398i 2.649159+0.785398i
     27310.00+10.00i 10.00+10.00i
     27410.00+10.00i 10.00+10.00i
     27510.00+10.00i 10.00+10.00i
     276
     2770.00+0.00i 0.00+0.00i
     2780.00+0.00i 0.00+0.00i
     2790.00+0.00i 0.00+0.00i
     280
     281Output:
     2822.65+0.79i 2.65+0.79i
     2832.65+0.79i 2.65+0.79i
     2842.65+0.79i 2.65+0.79i
    285285
    286286
     
    319319Operation: ten
    320320Input:
    321 3.000000 3.000000
    322 3.000000 3.000000
    323 3.000000 3.000000
    324 
    325 0.000000 0.000000
    326 0.000000 0.000000
    327 0.000000 0.000000
    328 
    329 Output:
    330 1000.000000 1000.000000
    331 1000.000000 1000.000000
    332 1000.000000 1000.000000
     3213.00 3.00
     3223.00 3.00
     3233.00 3.00
     324
     3250.00 0.00
     3260.00 0.00
     3270.00 0.00
     328
     329Output:
     3301000.00 1000.00
     3311000.00 1000.00
     3321000.00 1000.00
    333333
    334334
     
    343343Operation: ten
    344344Input:
    345 3.000000 3.000000
    346 3.000000 3.000000
    347 3.000000 3.000000
    348 
    349 0.000000 0.000000
    350 0.000000 0.000000
    351 0.000000 0.000000
    352 
    353 Output:
    354 1000.000000 1000.000000
    355 1000.000000 1000.000000
    356 1000.000000 1000.000000
     3453.00 3.00
     3463.00 3.00
     3473.00 3.00
     348
     3490.00 0.00
     3500.00 0.00
     3510.00 0.00
     352
     353Output:
     3541000.00 1000.00
     3551000.00 1000.00
     3561000.00 1000.00
    357357
    358358
     
    367367Operation: ten
    368368Input:
    369 3.000000+3.000000i 3.000000+3.000000i
    370 3.000000+3.000000i 3.000000+3.000000i
    371 3.000000+3.000000i 3.000000+3.000000i
    372 
    373 0.000000+0.000000i 0.000000+0.000000i
    374 0.000000+0.000000i 0.000000+0.000000i
    375 0.000000+0.000000i 0.000000+0.000000i
    376 
    377 Output:
    378 811.214661+584.748474i 811.214661+584.748474i
    379 811.214661+584.748474i 811.214661+584.748474i
    380 811.214661+584.748474i 811.214661+584.748474i
     3693.00+3.00i 3.00+3.00i
     3703.00+3.00i 3.00+3.00i
     3713.00+3.00i 3.00+3.00i
     372
     3730.00+0.00i 0.00+0.00i
     3740.00+0.00i 0.00+0.00i
     3750.00+0.00i 0.00+0.00i
     376
     377Output:
     378811.21+584.75i 811.21+584.75i
     379811.21+584.75i 811.21+584.75i
     380811.21+584.75i 811.21+584.75i
    381381
    382382
     
    415415Operation: log
    416416Input:
    417 1000.000000 1000.000000
    418 1000.000000 1000.000000
    419 1000.000000 1000.000000
    420 
    421 0.000000 0.000000
    422 0.000000 0.000000
    423 0.000000 0.000000
    424 
    425 Output:
    426 3.000000 3.000000
    427 3.000000 3.000000
    428 3.000000 3.000000
     4171000.00 1000.00
     4181000.00 1000.00
     4191000.00 1000.00
     420
     4210.00 0.00
     4220.00 0.00
     4230.00 0.00
     424
     425Output:
     4263.00 3.00
     4273.00 3.00
     4283.00 3.00
    429429
    430430
     
    439439Operation: log
    440440Input:
    441 1000.000000 1000.000000
    442 1000.000000 1000.000000
    443 1000.000000 1000.000000
    444 
    445 0.000000 0.000000
    446 0.000000 0.000000
    447 0.000000 0.000000
    448 
    449 Output:
    450 3.000000 3.000000
    451 3.000000 3.000000
    452 3.000000 3.000000
     4411000.00 1000.00
     4421000.00 1000.00
     4431000.00 1000.00
     444
     4450.00 0.00
     4460.00 0.00
     4470.00 0.00
     448
     449Output:
     4503.00 3.00
     4513.00 3.00
     4523.00 3.00
    453453
    454454
     
    463463Operation: log
    464464Input:
    465 1000.000000+1000.000000i 1000.000000+1000.000000i
    466 1000.000000+1000.000000i 1000.000000+1000.000000i
    467 1000.000000+1000.000000i 1000.000000+1000.000000i
    468 
    469 0.000000+0.000000i 0.000000+0.000000i
    470 0.000000+0.000000i 0.000000+0.000000i
    471 0.000000+0.000000i 0.000000+0.000000i
    472 
    473 Output:
    474 3.150515+0.341094i 3.150515+0.341094i
    475 3.150515+0.341094i 3.150515+0.341094i
    476 3.150515+0.341094i 3.150515+0.341094i
     4651000.00+1000.00i 1000.00+1000.00i
     4661000.00+1000.00i 1000.00+1000.00i
     4671000.00+1000.00i 1000.00+1000.00i
     468
     4690.00+0.00i 0.00+0.00i
     4700.00+0.00i 0.00+0.00i
     4710.00+0.00i 0.00+0.00i
     472
     473Output:
     4743.15+0.34i 3.15+0.34i
     4753.15+0.34i 3.15+0.34i
     4763.15+0.34i 3.15+0.34i
    477477
    478478
     
    511511Operation: sin
    512512Input:
    513 1.570796 1.570796
    514 1.570796 1.570796
    515 1.570796 1.570796
    516 
    517 0.000000 0.000000
    518 0.000000 0.000000
    519 0.000000 0.000000
    520 
    521 Output:
    522 1.000000 1.000000
    523 1.000000 1.000000
    524 1.000000 1.000000
     5131.57 1.57
     5141.57 1.57
     5151.57 1.57
     516
     5170.00 0.00
     5180.00 0.00
     5190.00 0.00
     520
     521Output:
     5221.00 1.00
     5231.00 1.00
     5241.00 1.00
    525525
    526526
     
    535535Operation: sin
    536536Input:
    537 1.570796 1.570796
    538 1.570796 1.570796
    539 1.570796 1.570796
    540 
    541 0.000000 0.000000
    542 0.000000 0.000000
    543 0.000000 0.000000
    544 
    545 Output:
    546 1.000000 1.000000
    547 1.000000 1.000000
    548 1.000000 1.000000
     5371.57 1.57
     5381.57 1.57
     5391.57 1.57
     540
     5410.00 0.00
     5420.00 0.00
     5430.00 0.00
     544
     545Output:
     5461.00 1.00
     5471.00 1.00
     5481.00 1.00
    549549
    550550
     
    559559Operation: sin
    560560Input:
    561 1.570796+1.570796i 1.570796+1.570796i
    562 1.570796+1.570796i 1.570796+1.570796i
    563 1.570796+1.570796i 1.570796+1.570796i
    564 
    565 0.000000+0.000000i 0.000000+0.000000i
    566 0.000000+0.000000i 0.000000+0.000000i
    567 0.000000+0.000000i 0.000000+0.000000i
    568 
    569 Output:
    570 2.509179+-0.000000i 2.509179+-0.000000i
    571 2.509179+-0.000000i 2.509179+-0.000000i
    572 2.509179+-0.000000i 2.509179+-0.000000i
     5611.57+1.57i 1.57+1.57i
     5621.57+1.57i 1.57+1.57i
     5631.57+1.57i 1.57+1.57i
     564
     5650.00+0.00i 0.00+0.00i
     5660.00+0.00i 0.00+0.00i
     5670.00+0.00i 0.00+0.00i
     568
     569Output:
     5702.51-0.00i 2.51-0.00i
     5712.51-0.00i 2.51-0.00i
     5722.51-0.00i 2.51-0.00i
    573573
    574574
     
    607607Operation: dsin
    608608Input:
    609 90.000000 90.000000
    610 90.000000 90.000000
    611 90.000000 90.000000
    612 
    613 0.000000 0.000000
    614 0.000000 0.000000
    615 0.000000 0.000000
    616 
    617 Output:
    618 1.000000 1.000000
    619 1.000000 1.000000
    620 1.000000 1.000000
     60990.00 90.00
     61090.00 90.00
     61190.00 90.00
     612
     6130.00 0.00
     6140.00 0.00
     6150.00 0.00
     616
     617Output:
     6181.00 1.00
     6191.00 1.00
     6201.00 1.00
    621621
    622622
     
    631631Operation: dsin
    632632Input:
    633 90.000000 90.000000
    634 90.000000 90.000000
    635 90.000000 90.000000
    636 
    637 0.000000 0.000000
    638 0.000000 0.000000
    639 0.000000 0.000000
    640 
    641 Output:
    642 1.000000 1.000000
    643 1.000000 1.000000
    644 1.000000 1.000000
     63390.00 90.00
     63490.00 90.00
     63590.00 90.00
     636
     6370.00 0.00
     6380.00 0.00
     6390.00 0.00
     640
     641Output:
     6421.00 1.00
     6431.00 1.00
     6441.00 1.00
    645645
    646646
     
    655655Operation: dsin
    656656Input:
    657 90.000000+90.000000i 90.000000+90.000000i
    658 90.000000+90.000000i 90.000000+90.000000i
    659 90.000000+90.000000i 90.000000+90.000000i
    660 
    661 0.000000+0.000000i 0.000000+0.000000i
    662 0.000000+0.000000i 0.000000+0.000000i
    663 0.000000+0.000000i 0.000000+0.000000i
    664 
    665 Output:
    666 2.509178+0.000000i 2.509178+0.000000i
    667 2.509178+0.000000i 2.509178+0.000000i
    668 2.509178+0.000000i 2.509178+0.000000i
     65790.00+90.00i 90.00+90.00i
     65890.00+90.00i 90.00+90.00i
     65990.00+90.00i 90.00+90.00i
     660
     6610.00+0.00i 0.00+0.00i
     6620.00+0.00i 0.00+0.00i
     6630.00+0.00i 0.00+0.00i
     664
     665Output:
     6662.51-0.00i 2.51-0.00i
     6672.51-0.00i 2.51-0.00i
     6682.51-0.00i 2.51-0.00i
    669669
    670670
     
    703703Operation: cos
    704704Input:
    705 0.000000 0.000000
    706 0.000000 0.000000
    707 0.000000 0.000000
    708 
    709 0.000000 0.000000
    710 0.000000 0.000000
    711 0.000000 0.000000
    712 
    713 Output:
    714 1.000000 1.000000
    715 1.000000 1.000000
    716 1.000000 1.000000
     7050.00 0.00
     7060.00 0.00
     7070.00 0.00
     708
     7090.00 0.00
     7100.00 0.00
     7110.00 0.00
     712
     713Output:
     7141.00 1.00
     7151.00 1.00
     7161.00 1.00
    717717
    718718
     
    727727Operation: cos
    728728Input:
    729 0.000000 0.000000
    730 0.000000 0.000000
    731 0.000000 0.000000
    732 
    733 0.000000 0.000000
    734 0.000000 0.000000
    735 0.000000 0.000000
    736 
    737 Output:
    738 1.000000 1.000000
    739 1.000000 1.000000
    740 1.000000 1.000000
     7290.00 0.00
     7300.00 0.00
     7310.00 0.00
     732
     7330.00 0.00
     7340.00 0.00
     7350.00 0.00
     736
     737Output:
     7381.00 1.00
     7391.00 1.00
     7401.00 1.00
    741741
    742742
     
    751751Operation: cos
    752752Input:
    753 0.000000+0.000000i 0.000000+0.000000i
    754 0.000000+0.000000i 0.000000+0.000000i
    755 0.000000+0.000000i 0.000000+0.000000i
    756 
    757 0.000000+0.000000i 0.000000+0.000000i
    758 0.000000+0.000000i 0.000000+0.000000i
    759 0.000000+0.000000i 0.000000+0.000000i
    760 
    761 Output:
    762 1.000000+-0.000000i 1.000000+-0.000000i
    763 1.000000+-0.000000i 1.000000+-0.000000i
    764 1.000000+-0.000000i 1.000000+-0.000000i
     7530.00+0.00i 0.00+0.00i
     7540.00+0.00i 0.00+0.00i
     7550.00+0.00i 0.00+0.00i
     756
     7570.00+0.00i 0.00+0.00i
     7580.00+0.00i 0.00+0.00i
     7590.00+0.00i 0.00+0.00i
     760
     761Output:
     7621.00-0.00i 1.00-0.00i
     7631.00-0.00i 1.00-0.00i
     7641.00-0.00i 1.00-0.00i
    765765
    766766
     
    799799Operation: dcos
    800800Input:
    801 0.000000 0.000000
    802 0.000000 0.000000
    803 0.000000 0.000000
    804 
    805 0.000000 0.000000
    806 0.000000 0.000000
    807 0.000000 0.000000
    808 
    809 Output:
    810 1.000000 1.000000
    811 1.000000 1.000000
    812 1.000000 1.000000
     8010.00 0.00
     8020.00 0.00
     8030.00 0.00
     804
     8050.00 0.00
     8060.00 0.00
     8070.00 0.00
     808
     809Output:
     8101.00 1.00
     8111.00 1.00
     8121.00 1.00
    813813
    814814
     
    823823Operation: dcos
    824824Input:
    825 0.000000 0.000000
    826 0.000000 0.000000
    827 0.000000 0.000000
    828 
    829 0.000000 0.000000
    830 0.000000 0.000000
    831 0.000000 0.000000
    832 
    833 Output:
    834 1.000000 1.000000
    835 1.000000 1.000000
    836 1.000000 1.000000
     8250.00 0.00
     8260.00 0.00
     8270.00 0.00
     828
     8290.00 0.00
     8300.00 0.00
     8310.00 0.00
     832
     833Output:
     8341.00 1.00
     8351.00 1.00
     8361.00 1.00
    837837
    838838
     
    847847Operation: dcos
    848848Input:
    849 0.000000+0.000000i 0.000000+0.000000i
    850 0.000000+0.000000i 0.000000+0.000000i
    851 0.000000+0.000000i 0.000000+0.000000i
    852 
    853 0.000000+0.000000i 0.000000+0.000000i
    854 0.000000+0.000000i 0.000000+0.000000i
    855 0.000000+0.000000i 0.000000+0.000000i
    856 
    857 Output:
    858 1.000000+-0.000000i 1.000000+-0.000000i
    859 1.000000+-0.000000i 1.000000+-0.000000i
    860 1.000000+-0.000000i 1.000000+-0.000000i
     8490.00+0.00i 0.00+0.00i
     8500.00+0.00i 0.00+0.00i
     8510.00+0.00i 0.00+0.00i
     852
     8530.00+0.00i 0.00+0.00i
     8540.00+0.00i 0.00+0.00i
     8550.00+0.00i 0.00+0.00i
     856
     857Output:
     8581.00-0.00i 1.00-0.00i
     8591.00-0.00i 1.00-0.00i
     8601.00-0.00i 1.00-0.00i
    861861
    862862
     
    895895Operation: tan
    896896Input:
    897 0.785398 0.785398
    898 0.785398 0.785398
    899 0.785398 0.785398
    900 
    901 0.000000 0.000000
    902 0.000000 0.000000
    903 0.000000 0.000000
    904 
    905 Output:
    906 1.000000 1.000000
    907 1.000000 1.000000
    908 1.000000 1.000000
     8970.79 0.79
     8980.79 0.79
     8990.79 0.79
     900
     9010.00 0.00
     9020.00 0.00
     9030.00 0.00
     904
     905Output:
     9061.00 1.00
     9071.00 1.00
     9081.00 1.00
    909909
    910910
     
    919919Operation: tan
    920920Input:
    921 0.785398 0.785398
    922 0.785398 0.785398
    923 0.785398 0.785398
    924 
    925 0.000000 0.000000
    926 0.000000 0.000000
    927 0.000000 0.000000
    928 
    929 Output:
    930 1.000000 1.000000
    931 1.000000 1.000000
    932 1.000000 1.000000
     9210.79 0.79
     9220.79 0.79
     9230.79 0.79
     924
     9250.00 0.00
     9260.00 0.00
     9270.00 0.00
     928
     929Output:
     9301.00 1.00
     9311.00 1.00
     9321.00 1.00
    933933
    934934
     
    943943Operation: tan
    944944Input:
    945 0.785398+0.785398i 0.785398+0.785398i
    946 0.785398+0.785398i 0.785398+0.785398i
    947 0.785398+0.785398i 0.785398+0.785398i
    948 
    949 0.000000+0.000000i 0.000000+0.000000i
    950 0.000000+0.000000i 0.000000+0.000000i
    951 0.000000+0.000000i 0.000000+0.000000i
    952 
    953 Output:
    954 0.398537+0.917152i 0.398537+0.917152i
    955 0.398537+0.917152i 0.398537+0.917152i
    956 0.398537+0.917152i 0.398537+0.917152i
     9450.79+0.79i 0.79+0.79i
     9460.79+0.79i 0.79+0.79i
     9470.79+0.79i 0.79+0.79i
     948
     9490.00+0.00i 0.00+0.00i
     9500.00+0.00i 0.00+0.00i
     9510.00+0.00i 0.00+0.00i
     952
     953Output:
     9540.40+0.92i 0.40+0.92i
     9550.40+0.92i 0.40+0.92i
     9560.40+0.92i 0.40+0.92i
    957957
    958958
     
    991991Operation: dtan
    992992Input:
    993 45.000000 45.000000
    994 45.000000 45.000000
    995 45.000000 45.000000
    996 
    997 0.000000 0.000000
    998 0.000000 0.000000
    999 0.000000 0.000000
    1000 
    1001 Output:
    1002 1.000000 1.000000
    1003 1.000000 1.000000
    1004 1.000000 1.000000
     99345.00 45.00
     99445.00 45.00
     99545.00 45.00
     996
     9970.00 0.00
     9980.00 0.00
     9990.00 0.00
     1000
     1001Output:
     10021.00 1.00
     10031.00 1.00
     10041.00 1.00
    10051005
    10061006
     
    10151015Operation: dtan
    10161016Input:
    1017 45.000000 45.000000
    1018 45.000000 45.000000
    1019 45.000000 45.000000
    1020 
    1021 0.000000 0.000000
    1022 0.000000 0.000000
    1023 0.000000 0.000000
    1024 
    1025 Output:
    1026 1.000000 1.000000
    1027 1.000000 1.000000
    1028 1.000000 1.000000
     101745.00 45.00
     101845.00 45.00
     101945.00 45.00
     1020
     10210.00 0.00
     10220.00 0.00
     10230.00 0.00
     1024
     1025Output:
     10261.00 1.00
     10271.00 1.00
     10281.00 1.00
    10291029
    10301030
     
    10391039Operation: dtan
    10401040Input:
    1041 45.000000+45.000000i 45.000000+45.000000i
    1042 45.000000+45.000000i 45.000000+45.000000i
    1043 45.000000+45.000000i 45.000000+45.000000i
    1044 
    1045 0.000000+0.000000i 0.000000+0.000000i
    1046 0.000000+0.000000i 0.000000+0.000000i
    1047 0.000000+0.000000i 0.000000+0.000000i
    1048 
    1049 Output:
    1050 0.398537+0.917152i 0.398537+0.917152i
    1051 0.398537+0.917152i 0.398537+0.917152i
    1052 0.398537+0.917152i 0.398537+0.917152i
     104145.00+45.00i 45.00+45.00i
     104245.00+45.00i 45.00+45.00i
     104345.00+45.00i 45.00+45.00i
     1044
     10450.00+0.00i 0.00+0.00i
     10460.00+0.00i 0.00+0.00i
     10470.00+0.00i 0.00+0.00i
     1048
     1049Output:
     10500.40+0.92i 0.40+0.92i
     10510.40+0.92i 0.40+0.92i
     10520.40+0.92i 0.40+0.92i
    10531053
    10541054
     
    10871087Operation: asin
    10881088Input:
    1089 1.000000 1.000000
    1090 1.000000 1.000000
    1091 1.000000 1.000000
    1092 
    1093 0.000000 0.000000
    1094 0.000000 0.000000
    1095 0.000000 0.000000
    1096 
    1097 Output:
    1098 1.570796 1.570796
    1099 1.570796 1.570796
    1100 1.570796 1.570796
     10891.00 1.00
     10901.00 1.00
     10911.00 1.00
     1092
     10930.00 0.00
     10940.00 0.00
     10950.00 0.00
     1096
     1097Output:
     10981.57 1.57
     10991.57 1.57
     11001.57 1.57
    11011101
    11021102
     
    11111111Operation: asin
    11121112Input:
    1113 1.000000 1.000000
    1114 1.000000 1.000000
    1115 1.000000 1.000000
    1116 
    1117 0.000000 0.000000
    1118 0.000000 0.000000
    1119 0.000000 0.000000
    1120 
    1121 Output:
    1122 1.570796 1.570796
    1123 1.570796 1.570796
    1124 1.570796 1.570796
     11131.00 1.00
     11141.00 1.00
     11151.00 1.00
     1116
     11170.00 0.00
     11180.00 0.00
     11190.00 0.00
     1120
     1121Output:
     11221.57 1.57
     11231.57 1.57
     11241.57 1.57
    11251125
    11261126
     
    11351135Operation: asin
    11361136Input:
    1137 1.000000+1.000000i 1.000000+1.000000i
    1138 1.000000+1.000000i 1.000000+1.000000i
    1139 1.000000+1.000000i 1.000000+1.000000i
    1140 
    1141 0.000000+0.000000i 0.000000+0.000000i
    1142 0.000000+0.000000i 0.000000+0.000000i
    1143 0.000000+0.000000i 0.000000+0.000000i
    1144 
    1145 Output:
    1146 0.666239+1.061275i 0.666239+1.061275i
    1147 0.666239+1.061275i 0.666239+1.061275i
    1148 0.666239+1.061275i 0.666239+1.061275i
     11371.00+1.00i 1.00+1.00i
     11381.00+1.00i 1.00+1.00i
     11391.00+1.00i 1.00+1.00i
     1140
     11410.00+0.00i 0.00+0.00i
     11420.00+0.00i 0.00+0.00i
     11430.00+0.00i 0.00+0.00i
     1144
     1145Output:
     11460.67+1.06i 0.67+1.06i
     11470.67+1.06i 0.67+1.06i
     11480.67+1.06i 0.67+1.06i
    11491149
    11501150
     
    11681168
    11691169Output:
    1170 89 89
    1171 89 89
    1172 89 89
     117090 90
     117190 90
     117290 90
    11731173
    11741174
     
    11831183Operation: dasin
    11841184Input:
    1185 1.000000 1.000000
    1186 1.000000 1.000000
    1187 1.000000 1.000000
    1188 
    1189 0.000000 0.000000
    1190 0.000000 0.000000
    1191 0.000000 0.000000
    1192 
    1193 Output:
    1194 90.000000 90.000000
    1195 90.000000 90.000000
    1196 90.000000 90.000000
     11851.00 1.00
     11861.00 1.00
     11871.00 1.00
     1188
     11890.00 0.00
     11900.00 0.00
     11910.00 0.00
     1192
     1193Output:
     119490.00 90.00
     119590.00 90.00
     119690.00 90.00
    11971197
    11981198
     
    12071207Operation: dasin
    12081208Input:
    1209 1.000000 1.000000
    1210 1.000000 1.000000
    1211 1.000000 1.000000
    1212 
    1213 0.000000 0.000000
    1214 0.000000 0.000000
    1215 0.000000 0.000000
    1216 
    1217 Output:
    1218 90.000000 90.000000
    1219 90.000000 90.000000
    1220 90.000000 90.000000
     12091.00 1.00
     12101.00 1.00
     12111.00 1.00
     1212
     12130.00 0.00
     12140.00 0.00
     12150.00 0.00
     1216
     1217Output:
     121890.00 90.00
     121990.00 90.00
     122090.00 90.00
    12211221
    12221222
     
    12311231Operation: dasin
    12321232Input:
    1233 1.000000+1.000000i 1.000000+1.000000i
    1234 1.000000+1.000000i 1.000000+1.000000i
    1235 1.000000+1.000000i 1.000000+1.000000i
    1236 
    1237 0.000000+0.000000i 0.000000+0.000000i
    1238 0.000000+0.000000i 0.000000+0.000000i
    1239 0.000000+0.000000i 0.000000+0.000000i
    1240 
    1241 Output:
    1242 38.172707+60.806583i 38.172707+60.806583i
    1243 38.172707+60.806583i 38.172707+60.806583i
    1244 38.172707+60.806583i 38.172707+60.806583i
     12331.00+1.00i 1.00+1.00i
     12341.00+1.00i 1.00+1.00i
     12351.00+1.00i 1.00+1.00i
     1236
     12370.00+0.00i 0.00+0.00i
     12380.00+0.00i 0.00+0.00i
     12390.00+0.00i 0.00+0.00i
     1240
     1241Output:
     124238.17+60.81i 38.17+60.81i
     124338.17+60.81i 38.17+60.81i
     124438.17+60.81i 38.17+60.81i
    12451245
    12461246
     
    12791279Operation: acos
    12801280Input:
    1281 0.000000 0.000000
    1282 0.000000 0.000000
    1283 0.000000 0.000000
    1284 
    1285 0.000000 0.000000
    1286 0.000000 0.000000
    1287 0.000000 0.000000
    1288 
    1289 Output:
    1290 1.570796 1.570796
    1291 1.570796 1.570796
    1292 1.570796 1.570796
     12810.00 0.00
     12820.00 0.00
     12830.00 0.00
     1284
     12850.00 0.00
     12860.00 0.00
     12870.00 0.00
     1288
     1289Output:
     12901.57 1.57
     12911.57 1.57
     12921.57 1.57
    12931293
    12941294
     
    13031303Operation: acos
    13041304Input:
    1305 0.000000 0.000000
    1306 0.000000 0.000000
    1307 0.000000 0.000000
    1308 
    1309 0.000000 0.000000
    1310 0.000000 0.000000
    1311 0.000000 0.000000
    1312 
    1313 Output:
    1314 1.570796 1.570796
    1315 1.570796 1.570796
    1316 1.570796 1.570796
     13050.00 0.00
     13060.00 0.00
     13070.00 0.00
     1308
     13090.00 0.00
     13100.00 0.00
     13110.00 0.00
     1312
     1313Output:
     13141.57 1.57
     13151.57 1.57
     13161.57 1.57
    13171317
    13181318
     
    13271327Operation: acos
    13281328Input:
    1329 0.000000+0.000000i 0.000000+0.000000i
    1330 0.000000+0.000000i 0.000000+0.000000i
    1331 0.000000+0.000000i 0.000000+0.000000i
    1332 
    1333 0.000000+0.000000i 0.000000+0.000000i
    1334 0.000000+0.000000i 0.000000+0.000000i
    1335 0.000000+0.000000i 0.000000+0.000000i
    1336 
    1337 Output:
    1338 1.570796+-0.000000i 1.570796+-0.000000i
    1339 1.570796+-0.000000i 1.570796+-0.000000i
    1340 1.570796+-0.000000i 1.570796+-0.000000i
     13290.00+0.00i 0.00+0.00i
     13300.00+0.00i 0.00+0.00i
     13310.00+0.00i 0.00+0.00i
     1332
     13330.00+0.00i 0.00+0.00i
     13340.00+0.00i 0.00+0.00i
     13350.00+0.00i 0.00+0.00i
     1336
     1337Output:
     13381.57-0.00i 1.57-0.00i
     13391.57-0.00i 1.57-0.00i
     13401.57-0.00i 1.57-0.00i
    13411341
    13421342
     
    13601360
    13611361Output:
    1362 89 89
    1363 89 89
    1364 89 89
     136290 90
     136390 90
     136490 90
    13651365
    13661366
     
    13751375Operation: dacos
    13761376Input:
    1377 0.000000 0.000000
    1378 0.000000 0.000000
    1379 0.000000 0.000000
    1380 
    1381 0.000000 0.000000
    1382 0.000000 0.000000
    1383 0.000000 0.000000
    1384 
    1385 Output:
    1386 90.000000 90.000000
    1387 90.000000 90.000000
    1388 90.000000 90.000000
     13770.00 0.00
     13780.00 0.00
     13790.00 0.00
     1380
     13810.00 0.00
     13820.00 0.00
     13830.00 0.00
     1384
     1385Output:
     138690.00 90.00
     138790.00 90.00
     138890.00 90.00
    13891389
    13901390
     
    13991399Operation: dacos
    14001400Input:
    1401 0.000000 0.000000
    1402 0.000000 0.000000
    1403 0.000000 0.000000
    1404 
    1405 0.000000 0.000000
    1406 0.000000 0.000000
    1407 0.000000 0.000000
    1408 
    1409 Output:
    1410 90.000000 90.000000
    1411 90.000000 90.000000
    1412 90.000000 90.000000
     14010.00 0.00
     14020.00 0.00
     14030.00 0.00
     1404
     14050.00 0.00
     14060.00 0.00
     14070.00 0.00
     1408
     1409Output:
     141090.00 90.00
     141190.00 90.00
     141290.00 90.00
    14131413
    14141414
     
    14231423Operation: dacos
    14241424Input:
    1425 0.000000+0.000000i 0.000000+0.000000i
    1426 0.000000+0.000000i 0.000000+0.000000i
    1427 0.000000+0.000000i 0.000000+0.000000i
    1428 
    1429 0.000000+0.000000i 0.000000+0.000000i
    1430 0.000000+0.000000i 0.000000+0.000000i
    1431 0.000000+0.000000i 0.000000+0.000000i
    1432 
    1433 Output:
    1434 90.000000+0.000000i 90.000000+0.000000i
    1435 90.000000+0.000000i 90.000000+0.000000i
    1436 90.000000+0.000000i 90.000000+0.000000i
     14250.00+0.00i 0.00+0.00i
     14260.00+0.00i 0.00+0.00i
     14270.00+0.00i 0.00+0.00i
     1428
     14290.00+0.00i 0.00+0.00i
     14300.00+0.00i 0.00+0.00i
     14310.00+0.00i 0.00+0.00i
     1432
     1433Output:
     143490.00+0.00i 90.00+0.00i
     143590.00+0.00i 90.00+0.00i
     143690.00+0.00i 90.00+0.00i
    14371437
    14381438
     
    14711471Operation: atan
    14721472Input:
    1473 1.000000 1.000000
    1474 1.000000 1.000000
    1475 1.000000 1.000000
    1476 
    1477 0.000000 0.000000
    1478 0.000000 0.000000
    1479 0.000000 0.000000
    1480 
    1481 Output:
    1482 0.785398 0.785398
    1483 0.785398 0.785398
    1484 0.785398 0.785398
     14731.00 1.00
     14741.00 1.00
     14751.00 1.00
     1476
     14770.00 0.00
     14780.00 0.00
     14790.00 0.00
     1480
     1481Output:
     14820.79 0.79
     14830.79 0.79
     14840.79 0.79
    14851485
    14861486
     
    14951495Operation: atan
    14961496Input:
    1497 1.000000 1.000000
    1498 1.000000 1.000000
    1499 1.000000 1.000000
    1500 
    1501 0.000000 0.000000
    1502 0.000000 0.000000
    1503 0.000000 0.000000
    1504 
    1505 Output:
    1506 0.785398 0.785398
    1507 0.785398 0.785398
    1508 0.785398 0.785398
     14971.00 1.00
     14981.00 1.00
     14991.00 1.00
     1500
     15010.00 0.00
     15020.00 0.00
     15030.00 0.00
     1504
     1505Output:
     15060.79 0.79
     15070.79 0.79
     15080.79 0.79
    15091509
    15101510
     
    15191519Operation: atan
    15201520Input:
    1521 1.000000+1.000000i 1.000000+1.000000i
    1522 1.000000+1.000000i 1.000000+1.000000i
    1523 1.000000+1.000000i 1.000000+1.000000i
    1524 
    1525 0.000000+0.000000i 0.000000+0.000000i
    1526 0.000000+0.000000i 0.000000+0.000000i
    1527 0.000000+0.000000i 0.000000+0.000000i
    1528 
    1529 Output:
    1530 1.017222+0.402359i 1.017222+0.402359i
    1531 1.017222+0.402359i 1.017222+0.402359i
    1532 1.017222+0.402359i 1.017222+0.402359i
     15211.00+1.00i 1.00+1.00i
     15221.00+1.00i 1.00+1.00i
     15231.00+1.00i 1.00+1.00i
     1524
     15250.00+0.00i 0.00+0.00i
     15260.00+0.00i 0.00+0.00i
     15270.00+0.00i 0.00+0.00i
     1528
     1529Output:
     15301.02+0.40i 1.02+0.40i
     15311.02+0.40i 1.02+0.40i
     15321.02+0.40i 1.02+0.40i
    15331533
    15341534
     
    15671567Operation: datan
    15681568Input:
    1569 1.000000 1.000000
    1570 1.000000 1.000000
    1571 1.000000 1.000000
    1572 
    1573 0.000000 0.000000
    1574 0.000000 0.000000
    1575 0.000000 0.000000
    1576 
    1577 Output:
    1578 45.000000 45.000000
    1579 45.000000 45.000000
    1580 45.000000 45.000000
     15691.00 1.00
     15701.00 1.00
     15711.00 1.00
     1572
     15730.00 0.00
     15740.00 0.00
     15750.00 0.00
     1576
     1577Output:
     157845.00 45.00
     157945.00 45.00
     158045.00 45.00
    15811581
    15821582
     
    15911591Operation: datan
    15921592Input:
    1593 1.000000 1.000000
    1594 1.000000 1.000000
    1595 1.000000 1.000000
    1596 
    1597 0.000000 0.000000
    1598 0.000000 0.000000
    1599 0.000000 0.000000
    1600 
    1601 Output:
    1602 45.000000 45.000000
    1603 45.000000 45.000000
    1604 45.000000 45.000000
     15931.00 1.00
     15941.00 1.00
     15951.00 1.00
     1596
     15970.00 0.00
     15980.00 0.00
     15990.00 0.00
     1600
     1601Output:
     160245.00 45.00
     160345.00 45.00
     160445.00 45.00
    16051605
    16061606
     
    16151615Operation: datan
    16161616Input:
    1617 1.000000+1.000000i 1.000000+1.000000i
    1618 1.000000+1.000000i 1.000000+1.000000i
    1619 1.000000+1.000000i 1.000000+1.000000i
    1620 
    1621 0.000000+0.000000i 0.000000+0.000000i
    1622 0.000000+0.000000i 0.000000+0.000000i
    1623 0.000000+0.000000i 0.000000+0.000000i
    1624 
    1625 Output:
    1626 58.282524+23.053499i 58.282524+23.053499i
    1627 58.282524+23.053499i 58.282524+23.053499i
    1628 58.282524+23.053499i 58.282524+23.053499i
     16171.00+1.00i 1.00+1.00i
     16181.00+1.00i 1.00+1.00i
     16191.00+1.00i 1.00+1.00i
     1620
     16210.00+0.00i 0.00+0.00i
     16220.00+0.00i 0.00+0.00i
     16230.00+0.00i 0.00+0.00i
     1624
     1625Output:
     162658.28+23.05i 58.28+23.05i
     162758.28+23.05i 58.28+23.05i
     162858.28+23.05i 58.28+23.05i
    16291629
    16301630
     
    16631663Operation: abs
    16641664Input:
    1665 -10.000000
    1666 -10.000000
    1667 -10.000000
    1668 
    1669 0.000000
    1670 0.000000
    1671 0.000000
    1672 
    1673 Output:
    1674 10.000000
    1675 10.000000
    1676 10.000000
     1665-10.00
     1666-10.00
     1667-10.00
     1668
     16690.00
     16700.00
     16710.00
     1672
     1673Output:
     167410.00
     167510.00
     167610.00
    16771677
    16781678
     
    16871687Operation: abs
    16881688Input:
    1689 -10.000000
    1690 -10.000000
    1691 -10.000000
    1692 
    1693 0.000000
    1694 0.000000
    1695 0.000000
    1696 
    1697 Output:
    1698 10.000000
    1699 10.000000
    1700 10.000000
     1689-10.00
     1690-10.00
     1691-10.00
     1692
     16930.00
     16940.00
     16950.00
     1696
     1697Output:
     169810.00
     169910.00
     170010.00
    17011701
    17021702
     
    17111711Operation: abs
    17121712Input:
    1713 -10.000000+-10.000000i
    1714 -10.000000+-10.000000i
    1715 -10.000000+-10.000000i
    1716 
    1717 0.000000+0.000000i
    1718 0.000000+0.000000i
    1719 0.000000+0.000000i
    1720 
    1721 Output:
    1722 14.142136+0.000000i
    1723 14.142136+0.000000i
    1724 14.142136+0.000000i
     1713-10.00-10.00i
     1714-10.00-10.00i
     1715-10.00-10.00i
     1716
     17170.00+0.00i
     17180.00+0.00i
     17190.00+0.00i
     1720
     1721Output:
     172214.14+0.00i
     172314.14+0.00i
     172414.14+0.00i
    17251725
    17261726
     
    17591759Operation: exp
    17601760Input:
    1761 10.000000
    1762 10.000000
    1763 10.000000
    1764 
    1765 0.000000
    1766 0.000000
    1767 0.000000
    1768 
    1769 Output:
    1770 22026.464844
    1771 22026.464844
    1772 22026.464844
     176110.00
     176210.00
     176310.00
     1764
     17650.00
     17660.00
     17670.00
     1768
     1769Output:
     177022026.46
     177122026.46
     177222026.46
    17731773
    17741774
     
    17831783Operation: exp
    17841784Input:
    1785 10.000000
    1786 10.000000
    1787 10.000000
    1788 
    1789 0.000000
    1790 0.000000
    1791 0.000000
    1792 
    1793 Output:
    1794 22026.465795
    1795 22026.465795
    1796 22026.465795
     178510.00
     178610.00
     178710.00
     1788
     17890.00
     17900.00
     17910.00
     1792
     1793Output:
     179422026.47
     179522026.47
     179622026.47
    17971797
    17981798
     
    18071807Operation: exp
    18081808Input:
    1809 10.000000+10.000000i
    1810 10.000000+10.000000i
    1811 10.000000+10.000000i
    1812 
    1813 0.000000+0.000000i
    1814 0.000000+0.000000i
    1815 0.000000+0.000000i
    1816 
    1817 Output:
    1818 -18481.781250+-11982.862305i
    1819 -18481.781250+-11982.862305i
    1820 -18481.781250+-11982.862305i
     180910.00+10.00i
     181010.00+10.00i
     181110.00+10.00i
     1812
     18130.00+0.00i
     18140.00+0.00i
     18150.00+0.00i
     1816
     1817Output:
     1818-18481.78-11982.86i
     1819-18481.78-11982.86i
     1820-18481.78-11982.86i
    18211821
    18221822
     
    18551855Operation: ln
    18561856Input:
    1857 10.000000
    1858 10.000000
    1859 10.000000
    1860 
    1861 0.000000
    1862 0.000000
    1863 0.000000
    1864 
    1865 Output:
    1866 2.302585
    1867 2.302585
    1868 2.302585
     185710.00
     185810.00
     185910.00
     1860
     18610.00
     18620.00
     18630.00
     1864
     1865Output:
     18662.30
     18672.30
     18682.30
    18691869
    18701870
     
    18791879Operation: ln
    18801880Input:
    1881 10.000000
    1882 10.000000
    1883 10.000000
    1884 
    1885 0.000000
    1886 0.000000
    1887 0.000000
    1888 
    1889 Output:
    1890 2.302585
    1891 2.302585
    1892 2.302585
     188110.00
     188210.00
     188310.00
     1884
     18850.00
     18860.00
     18870.00
     1888
     1889Output:
     18902.30
     18912.30
     18922.30
    18931893
    18941894
     
    19031903Operation: ln
    19041904Input:
    1905 10.000000+10.000000i
    1906 10.000000+10.000000i
    1907 10.000000+10.000000i
    1908 
    1909 0.000000+0.000000i
    1910 0.000000+0.000000i
    1911 0.000000+0.000000i
    1912 
    1913 Output:
    1914 2.649159+0.785398i
    1915 2.649159+0.785398i
    1916 2.649159+0.785398i
     190510.00+10.00i
     190610.00+10.00i
     190710.00+10.00i
     1908
     19090.00+0.00i
     19100.00+0.00i
     19110.00+0.00i
     1912
     1913Output:
     19142.65+0.79i
     19152.65+0.79i
     19162.65+0.79i
    19171917
    19181918
     
    19511951Operation: ten
    19521952Input:
    1953 3.000000
    1954 3.000000
    1955 3.000000
    1956 
    1957 0.000000
    1958 0.000000
    1959 0.000000
    1960 
    1961 Output:
    1962 1000.000000
    1963 1000.000000
    1964 1000.000000
     19533.00
     19543.00
     19553.00
     1956
     19570.00
     19580.00
     19590.00
     1960
     1961Output:
     19621000.00
     19631000.00
     19641000.00
    19651965
    19661966
     
    19751975Operation: ten
    19761976Input:
    1977 3.000000
    1978 3.000000
    1979 3.000000
    1980 
    1981 0.000000
    1982 0.000000
    1983 0.000000
    1984 
    1985 Output:
    1986 1000.000000
    1987 1000.000000
    1988 1000.000000
     19773.00
     19783.00
     19793.00
     1980
     19810.00
     19820.00
     19830.00
     1984
     1985Output:
     19861000.00
     19871000.00
     19881000.00
    19891989
    19901990
     
    19991999Operation: ten
    20002000Input:
    2001 3.000000+3.000000i
    2002 3.000000+3.000000i
    2003 3.000000+3.000000i
    2004 
    2005 0.000000+0.000000i
    2006 0.000000+0.000000i
    2007 0.000000+0.000000i
    2008 
    2009 Output:
    2010 811.214661+584.748474i
    2011 811.214661+584.748474i
    2012 811.214661+584.748474i
     20013.00+3.00i
     20023.00+3.00i
     20033.00+3.00i
     2004
     20050.00+0.00i
     20060.00+0.00i
     20070.00+0.00i
     2008
     2009Output:
     2010811.21+584.75i
     2011811.21+584.75i
     2012811.21+584.75i
    20132013
    20142014
     
    20472047Operation: log
    20482048Input:
    2049 1000.000000
    2050 1000.000000
    2051 1000.000000
    2052 
    2053 0.000000
    2054 0.000000
    2055 0.000000
    2056 
    2057 Output:
    2058 3.000000
    2059 3.000000
    2060 3.000000
     20491000.00
     20501000.00
     20511000.00
     2052
     20530.00
     20540.00
     20550.00
     2056
     2057Output:
     20583.00
     20593.00
     20603.00
    20612061
    20622062
     
    20712071Operation: log
    20722072Input:
    2073 1000.000000
    2074 1000.000000
    2075 1000.000000
    2076 
    2077 0.000000
    2078 0.000000
    2079 0.000000
    2080 
    2081 Output:
    2082 3.000000
    2083 3.000000
    2084 3.000000
     20731000.00
     20741000.00
     20751000.00
     2076
     20770.00
     20780.00
     20790.00
     2080
     2081Output:
     20823.00
     20833.00
     20843.00
    20852085
    20862086
     
    20952095Operation: log
    20962096Input:
    2097 1000.000000+1000.000000i
    2098 1000.000000+1000.000000i
    2099 1000.000000+1000.000000i
    2100 
    2101 0.000000+0.000000i
    2102 0.000000+0.000000i
    2103 0.000000+0.000000i
    2104 
    2105 Output:
    2106 3.150515+0.341094i
    2107 3.150515+0.341094i
    2108 3.150515+0.341094i
     20971000.00+1000.00i
     20981000.00+1000.00i
     20991000.00+1000.00i
     2100
     21010.00+0.00i
     21020.00+0.00i
     21030.00+0.00i
     2104
     2105Output:
     21063.15+0.34i
     21073.15+0.34i
     21083.15+0.34i
    21092109
    21102110
     
    21432143Operation: sin
    21442144Input:
    2145 1.570796
    2146 1.570796
    2147 1.570796
    2148 
    2149 0.000000
    2150 0.000000
    2151 0.000000
    2152 
    2153 Output:
    2154 1.000000
    2155 1.000000
    2156 1.000000
     21451.57
     21461.57
     21471.57
     2148
     21490.00
     21500.00
     21510.00
     2152
     2153Output:
     21541.00
     21551.00
     21561.00
    21572157
    21582158
     
    21672167Operation: sin
    21682168Input:
    2169 1.570796
    2170 1.570796
    2171 1.570796
    2172 
    2173 0.000000
    2174 0.000000
    2175 0.000000
    2176 
    2177 Output:
    2178 1.000000
    2179 1.000000
    2180 1.000000
     21691.57
     21701.57
     21711.57
     2172
     21730.00
     21740.00
     21750.00
     2176
     2177Output:
     21781.00
     21791.00
     21801.00
    21812181
    21822182
     
    21912191Operation: sin
    21922192Input:
    2193 1.570796+1.570796i
    2194 1.570796+1.570796i
    2195 1.570796+1.570796i
    2196 
    2197 0.000000+0.000000i
    2198 0.000000+0.000000i
    2199 0.000000+0.000000i
    2200 
    2201 Output:
    2202 2.509179+-0.000000i
    2203 2.509179+-0.000000i
    2204 2.509179+-0.000000i
     21931.57+1.57i
     21941.57+1.57i
     21951.57+1.57i
     2196
     21970.00+0.00i
     21980.00+0.00i
     21990.00+0.00i
     2200
     2201Output:
     22022.51-0.00i
     22032.51-0.00i
     22042.51-0.00i
    22052205
    22062206
     
    22392239Operation: dsin
    22402240Input:
    2241 90.000000
    2242 90.000000
    2243 90.000000
    2244 
    2245 0.000000
    2246 0.000000
    2247 0.000000
    2248 
    2249 Output:
    2250 1.000000
    2251 1.000000
    2252 1.000000
     224190.00
     224290.00
     224390.00
     2244
     22450.00
     22460.00
     22470.00
     2248
     2249Output:
     22501.00
     22511.00
     22521.00
    22532253
    22542254
     
    22632263Operation: dsin
    22642264Input:
    2265 90.000000
    2266 90.000000
    2267 90.000000
    2268 
    2269 0.000000
    2270 0.000000
    2271 0.000000
    2272 
    2273 Output:
    2274 1.000000
    2275 1.000000
    2276 1.000000
     226590.00
     226690.00
     226790.00
     2268
     22690.00
     22700.00
     22710.00
     2272
     2273Output:
     22741.00
     22751.00
     22761.00
    22772277
    22782278
     
    22872287Operation: dsin
    22882288Input:
    2289 90.000000+90.000000i
    2290 90.000000+90.000000i
    2291 90.000000+90.000000i
    2292 
    2293 0.000000+0.000000i
    2294 0.000000+0.000000i
    2295 0.000000+0.000000i
    2296 
    2297 Output:
    2298 2.509178+0.000000i
    2299 2.509178+0.000000i
    2300 2.509178+0.000000i
     228990.00+90.00i
     229090.00+90.00i
     229190.00+90.00i
     2292
     22930.00+0.00i
     22940.00+0.00i
     22950.00+0.00i
     2296
     2297Output:
     22982.51-0.00i
     22992.51-0.00i
     23002.51-0.00i
    23012301
    23022302
     
    23352335Operation: cos
    23362336Input:
    2337 0.000000
    2338 0.000000
    2339 0.000000
    2340 
    2341 0.000000
    2342 0.000000
    2343 0.000000
    2344 
    2345 Output:
    2346 1.000000
    2347 1.000000
    2348 1.000000
     23370.00
     23380.00
     23390.00
     2340
     23410.00
     23420.00
     23430.00
     2344
     2345Output:
     23461.00
     23471.00
     23481.00
    23492349
    23502350
     
    23592359Operation: cos
    23602360Input:
    2361 0.000000
    2362 0.000000
    2363 0.000000
    2364 
    2365 0.000000
    2366 0.000000
    2367 0.000000
    2368 
    2369 Output:
    2370 1.000000
    2371 1.000000
    2372 1.000000
     23610.00
     23620.00
     23630.00
     2364
     23650.00
     23660.00
     23670.00
     2368
     2369Output:
     23701.00
     23711.00
     23721.00
    23732373
    23742374
     
    23832383Operation: cos
    23842384Input:
    2385 0.000000+0.000000i
    2386 0.000000+0.000000i
    2387 0.000000+0.000000i
    2388 
    2389 0.000000+0.000000i
    2390 0.000000+0.000000i
    2391 0.000000+0.000000i
    2392 
    2393 Output:
    2394 1.000000+-0.000000i
    2395 1.000000+-0.000000i
    2396 1.000000+-0.000000i
     23850.00+0.00i
     23860.00+0.00i
     23870.00+0.00i
     2388
     23890.00+0.00i
     23900.00+0.00i
     23910.00+0.00i
     2392
     2393Output:
     23941.00-0.00i
     23951.00-0.00i
     23961.00-0.00i
    23972397
    23982398
     
    24312431Operation: dcos
    24322432Input:
    2433 0.000000
    2434 0.000000
    2435 0.000000
    2436 
    2437 0.000000
    2438 0.000000
    2439 0.000000
    2440 
    2441 Output:
    2442 1.000000
    2443 1.000000
    2444 1.000000
     24330.00
     24340.00
     24350.00
     2436
     24370.00
     24380.00
     24390.00
     2440
     2441Output:
     24421.00
     24431.00
     24441.00
    24452445
    24462446
     
    24552455Operation: dcos
    24562456Input:
    2457 0.000000
    2458 0.000000
    2459 0.000000
    2460 
    2461 0.000000
    2462 0.000000
    2463 0.000000
    2464 
    2465 Output:
    2466 1.000000
    2467 1.000000
    2468 1.000000
     24570.00
     24580.00
     24590.00
     2460
     24610.00
     24620.00
     24630.00
     2464
     2465Output:
     24661.00
     24671.00
     24681.00
    24692469
    24702470
     
    24792479Operation: dcos
    24802480Input:
    2481 0.000000+0.000000i
    2482 0.000000+0.000000i
    2483 0.000000+0.000000i
    2484 
    2485 0.000000+0.000000i
    2486 0.000000+0.000000i
    2487 0.000000+0.000000i
    2488 
    2489 Output:
    2490 1.000000+-0.000000i
    2491 1.000000+-0.000000i
    2492 1.000000+-0.000000i
     24810.00+0.00i
     24820.00+0.00i
     24830.00+0.00i
     2484
     24850.00+0.00i
     24860.00+0.00i
     24870.00+0.00i
     2488
     2489Output:
     24901.00-0.00i
     24911.00-0.00i
     24921.00-0.00i
    24932493
    24942494
     
    25272527Operation: tan
    25282528Input:
    2529 0.785398
    2530 0.785398
    2531 0.785398
    2532 
    2533 0.000000
    2534 0.000000
    2535 0.000000
    2536 
    2537 Output:
    2538 1.000000
    2539 1.000000
    2540 1.000000
     25290.79
     25300.79
     25310.79
     2532
     25330.00
     25340.00
     25350.00
     2536
     2537Output:
     25381.00
     25391.00
     25401.00
    25412541
    25422542
     
    25512551Operation: tan
    25522552Input:
    2553 0.785398
    2554 0.785398
    2555 0.785398
    2556 
    2557 0.000000
    2558 0.000000
    2559 0.000000
    2560 
    2561 Output:
    2562 1.000000
    2563 1.000000
    2564 1.000000
     25530.79
     25540.79
     25550.79
     2556
     25570.00
     25580.00
     25590.00
     2560
     2561Output:
     25621.00
     25631.00
     25641.00
    25652565
    25662566
     
    25752575Operation: tan
    25762576Input:
    2577 0.785398+0.785398i
    2578 0.785398+0.785398i
    2579 0.785398+0.785398i
    2580 
    2581 0.000000+0.000000i
    2582 0.000000+0.000000i
    2583 0.000000+0.000000i
    2584 
    2585 Output:
    2586 0.398537+0.917152i
    2587 0.398537+0.917152i
    2588 0.398537+0.917152i
     25770.79+0.79i
     25780.79+0.79i
     25790.79+0.79i
     2580
     25810.00+0.00i
     25820.00+0.00i
     25830.00+0.00i
     2584
     2585Output:
     25860.40+0.92i
     25870.40+0.92i
     25880.40+0.92i
    25892589
    25902590
     
    26232623Operation: dtan
    26242624Input:
    2625 45.000000
    2626 45.000000
    2627 45.000000
    2628 
    2629 0.000000
    2630 0.000000
    2631 0.000000
    2632 
    2633 Output:
    2634 1.000000
    2635 1.000000
    2636 1.000000
     262545.00
     262645.00
     262745.00
     2628
     26290.00
     26300.00
     26310.00
     2632
     2633Output:
     26341.00
     26351.00
     26361.00
    26372637
    26382638
     
    26472647Operation: dtan
    26482648Input:
    2649 45.000000
    2650 45.000000
    2651 45.000000
    2652 
    2653 0.000000
    2654 0.000000
    2655 0.000000
    2656 
    2657 Output:
    2658 1.000000
    2659 1.000000
    2660 1.000000
     264945.00
     265045.00
     265145.00
     2652
     26530.00
     26540.00
     26550.00
     2656
     2657Output:
     26581.00
     26591.00
     26601.00
    26612661
    26622662
     
    26712671Operation: dtan
    26722672Input:
    2673 45.000000+45.000000i
    2674 45.000000+45.000000i
    2675 45.000000+45.000000i
    2676 
    2677 0.000000+0.000000i
    2678 0.000000+0.000000i
    2679 0.000000+0.000000i
    2680 
    2681 Output:
    2682 0.398537+0.917152i
    2683 0.398537+0.917152i
    2684 0.398537+0.917152i
     267345.00+45.00i
     267445.00+45.00i
     267545.00+45.00i
     2676
     26770.00+0.00i
     26780.00+0.00i
     26790.00+0.00i
     2680
     2681Output:
     26820.40+0.92i
     26830.40+0.92i
     26840.40+0.92i
    26852685
    26862686
     
    27192719Operation: asin
    27202720Input:
    2721 1.000000
    2722 1.000000
    2723 1.000000
    2724 
    2725 0.000000
    2726 0.000000
    2727 0.000000
    2728 
    2729 Output:
    2730 1.570796
    2731 1.570796
    2732 1.570796
     27211.00
     27221.00
     27231.00
     2724
     27250.00
     27260.00
     27270.00
     2728
     2729Output:
     27301.57
     27311.57
     27321.57
    27332733
    27342734
     
    27432743Operation: asin
    27442744Input:
    2745 1.000000
    2746 1.000000
    2747 1.000000
    2748 
    2749 0.000000
    2750 0.000000
    2751 0.000000
    2752 
    2753 Output:
    2754 1.570796
    2755 1.570796
    2756 1.570796
     27451.00
     27461.00
     27471.00
     2748
     27490.00
     27500.00
     27510.00
     2752
     2753Output:
     27541.57
     27551.57
     27561.57
    27572757
    27582758
     
    27672767Operation: asin
    27682768Input:
    2769 1.000000+1.000000i
    2770 1.000000+1.000000i
    2771 1.000000+1.000000i
    2772 
    2773 0.000000+0.000000i
    2774 0.000000+0.000000i
    2775 0.000000+0.000000i
    2776 
    2777 Output:
    2778 0.666239+1.061275i
    2779 0.666239+1.061275i
    2780 0.666239+1.061275i
     27691.00+1.00i
     27701.00+1.00i
     27711.00+1.00i
     2772
     27730.00+0.00i
     27740.00+0.00i
     27750.00+0.00i
     2776
     2777Output:
     27780.67+1.06i
     27790.67+1.06i
     27800.67+1.06i
    27812781
    27822782
     
    28002800
    28012801Output:
    2802 89
    2803 89
    2804 89
     280290
     280390
     280490
    28052805
    28062806
     
    28152815Operation: dasin
    28162816Input:
    2817 1.000000
    2818 1.000000
    2819 1.000000
    2820 
    2821 0.000000
    2822 0.000000
    2823 0.000000
    2824 
    2825 Output:
    2826 90.000000
    2827 90.000000
    2828 90.000000
     28171.00
     28181.00
     28191.00
     2820
     28210.00
     28220.00
     28230.00
     2824
     2825Output:
     282690.00
     282790.00
     282890.00
    28292829
    28302830
     
    28392839Operation: dasin
    28402840Input:
    2841 1.000000
    2842 1.000000
    2843 1.000000
    2844 
    2845 0.000000
    2846 0.000000
    2847 0.000000
    2848 
    2849 Output:
    2850 90.000000
    2851 90.000000
    2852 90.000000
     28411.00
     28421.00
     28431.00
     2844
     28450.00
     28460.00
     28470.00
     2848
     2849Output:
     285090.00
     285190.00
     285290.00
    28532853
    28542854
     
    28632863Operation: dasin
    28642864Input:
    2865 1.000000+1.000000i
    2866 1.000000+1.000000i
    2867 1.000000+1.000000i
    2868 
    2869 0.000000+0.000000i
    2870 0.000000+0.000000i
    2871 0.000000+0.000000i
    2872 
    2873 Output:
    2874 38.172707+60.806583i
    2875 38.172707+60.806583i
    2876 38.172707+60.806583i
     28651.00+1.00i
     28661.00+1.00i
     28671.00+1.00i
     2868
     28690.00+0.00i
     28700.00+0.00i
     28710.00+0.00i
     2872
     2873Output:
     287438.17+60.81i
     287538.17+60.81i
     287638.17+60.81i
    28772877
    28782878
     
    29112911Operation: acos
    29122912Input:
    2913 0.000000
    2914 0.000000
    2915 0.000000
    2916 
    2917 0.000000
    2918 0.000000
    2919 0.000000
    2920 
    2921 Output:
    2922 1.570796
    2923 1.570796
    2924 1.570796
     29130.00
     29140.00
     29150.00
     2916
     29170.00
     29180.00
     29190.00
     2920
     2921Output:
     29221.57
     29231.57
     29241.57
    29252925
    29262926
     
    29352935Operation: acos
    29362936Input:
    2937 0.000000
    2938 0.000000
    2939 0.000000
    2940 
    2941 0.000000
    2942 0.000000
    2943 0.000000
    2944 
    2945 Output:
    2946 1.570796
    2947 1.570796
    2948 1.570796
     29370.00
     29380.00
     29390.00
     2940
     29410.00
     29420.00
     29430.00
     2944
     2945Output:
     29461.57
     29471.57
     29481.57
    29492949
    29502950
     
    29592959Operation: acos
    29602960Input:
    2961 0.000000+0.000000i
    2962 0.000000+0.000000i
    2963 0.000000+0.000000i
    2964 
    2965 0.000000+0.000000i
    2966 0.000000+0.000000i
    2967 0.000000+0.000000i
    2968 
    2969 Output:
    2970 1.570796+-0.000000i
    2971 1.570796+-0.000000i
    2972 1.570796+-0.000000i
     29610.00+0.00i
     29620.00+0.00i
     29630.00+0.00i
     2964
     29650.00+0.00i
     29660.00+0.00i
     29670.00+0.00i
     2968
     2969Output:
     29701.57-0.00i
     29711.57-0.00i
     29721.57-0.00i
    29732973
    29742974
     
    29922992
    29932993Output:
    2994 89
    2995 89
    2996 89
     299490
     299590
     299690
    29972997
    29982998
     
    30073007Operation: dacos
    30083008Input:
    3009 0.000000
    3010 0.000000
    3011 0.000000
    3012 
    3013 0.000000
    3014 0.000000
    3015 0.000000
    3016 
    3017 Output:
    3018 90.000000
    3019 90.000000
    3020 90.000000
     30090.00
     30100.00
     30110.00
     3012
     30130.00
     30140.00
     30150.00
     3016
     3017Output:
     301890.00
     301990.00
     302090.00
    30213021
    30223022
     
    30313031Operation: dacos
    30323032Input:
    3033 0.000000
    3034 0.000000
    3035 0.000000
    3036 
    3037 0.000000
    3038 0.000000
    3039 0.000000
    3040 
    3041 Output:
    3042 90.000000
    3043 90.000000
    3044 90.000000
     30330.00
     30340.00
     30350.00
     3036
     30370.00
     30380.00
     30390.00
     3040
     3041Output:
     304290.00
     304390.00
     304490.00
    30453045
    30463046
     
    30553055Operation: dacos
    30563056Input:
    3057 0.000000+0.000000i
    3058 0.000000+0.000000i
    3059 0.000000+0.000000i
    3060 
    3061 0.000000+0.000000i
    3062 0.000000+0.000000i
    3063 0.000000+0.000000i
    3064 
    3065 Output:
    3066 90.000000+0.000000i
    3067 90.000000+0.000000i
    3068 90.000000+0.000000i
     30570.00+0.00i
     30580.00+0.00i
     30590.00+0.00i
     3060
     30610.00+0.00i
     30620.00+0.00i
     30630.00+0.00i
     3064
     3065Output:
     306690.00+0.00i
     306790.00+0.00i
     306890.00+0.00i
    30693069
    30703070
     
    31033103Operation: atan
    31043104Input:
    3105 1.000000
    3106 1.000000
    3107 1.000000
    3108 
    3109 0.000000
    3110 0.000000
    3111 0.000000
    3112 
    3113 Output:
    3114 0.785398
    3115 0.785398
    3116 0.785398
     31051.00
     31061.00
     31071.00
     3108
     31090.00
     31100.00
     31110.00
     3112
     3113Output:
     31140.79
     31150.79
     31160.79
    31173117
    31183118
     
    31273127Operation: atan
    31283128Input:
    3129 1.000000
    3130 1.000000
    3131 1.000000
    3132 
    3133 0.000000
    3134 0.000000
    3135 0.000000
    3136 
    3137 Output:
    3138 0.785398
    3139 0.785398
    3140 0.785398
     31291.00
     31301.00
     31311.00
     3132
     31330.00
     31340.00
     31350.00
     3136
     3137Output:
     31380.79
     31390.79
     31400.79
    31413141
    31423142
     
    31513151Operation: atan
    31523152Input:
    3153 1.000000+1.000000i
    3154 1.000000+1.000000i
    3155 1.000000+1.000000i
    3156 
    3157 0.000000+0.000000i
    3158 0.000000+0.000000i
    3159 0.000000+0.000000i
    3160 
    3161 Output:
    3162 1.017222+0.402359i
    3163 1.017222+0.402359i
    3164 1.017222+0.402359i
     31531.00+1.00i
     31541.00+1.00i
     31551.00+1.00i
     3156
     31570.00+0.00i
     31580.00+0.00i
     31590.00+0.00i
     3160
     3161Output:
     31621.02+0.40i
     31631.02+0.40i
     31641.02+0.40i
    31653165
    31663166
     
    31993199Operation: datan
    32003200Input:
    3201 1.000000
    3202 1.000000
    3203 1.000000
    3204 
    3205 0.000000
    3206 0.000000
    3207 0.000000
    3208 
    3209 Output:
    3210 45.000000
    3211 45.000000
    3212 45.000000
     32011.00
     32021.00
     32031.00
     3204
     32050.00
     32060.00
     32070.00
     3208
     3209Output:
     321045.00
     321145.00
     321245.00
    32133213
    32143214
     
    32233223Operation: datan
    32243224Input:
    3225 1.000000
    3226 1.000000
    3227 1.000000
    3228 
    3229 0.000000
    3230 0.000000
    3231 0.000000
    3232 
    3233 Output:
    3234 45.000000
    3235 45.000000
    3236 45.000000
     32251.00
     32261.00
     32271.00
     3228
     32290.00
     32300.00
     32310.00
     3232
     3233Output:
     323445.00
     323545.00
     323645.00
    32373237
    32383238
     
    32473247Operation: datan
    32483248Input:
    3249 1.000000+1.000000i
    3250 1.000000+1.000000i
    3251 1.000000+1.000000i
    3252 
    3253 0.000000+0.000000i
    3254 0.000000+0.000000i
    3255 0.000000+0.000000i
    3256 
    3257 Output:
    3258 58.282524+23.053499i
    3259 58.282524+23.053499i
    3260 58.282524+23.053499i
    3261 
    3262 
    3263 ---> TESTPOINT PASSED (psMatrixVectorArithmetic{Test vector psUnaryOp} | tst_psMatrixVectorArithmetic02.c)
    3264 
     32491.00+1.00i
     32501.00+1.00i
     32511.00+1.00i
     3252
     32530.00+0.00i
     32540.00+0.00i
     32550.00+0.00i
     3256
     3257Output:
     325858.28+23.05i
     325958.28+23.05i
     326058.28+23.05i
     3261
     3262
     3263---> TESTPOINT PASSED (psMatrixVectorArithmetic{Test vector psUnaryOp} | tst_psMatrixVectorArithmetic02.c)
     3264
  • trunk/psLib/test/dataManip/verified/tst_psStats07.stdout

    r1310 r1365  
    66
    77(LQBinNum, UQBinNum, maxBinNum) is (15, 35, 27)
    8 The expected Mean was 32.000000; the calculated Mean was 32.588161
     8The expected Mean was 32.00; the calculated Mean was 32.59
    99
    1010---> TESTPOINT PASSED (psVector functions{PS_STAT_ROBUST_STATS: robust mean: no vector mask} | tst_psStats07.c)
     
    1616\**********************************************************************************/
    1717
    18 The expected Median was 32.000000; the calculated Median was 32.485466
     18The expected Median was 32.00; the calculated Median was 32.49
    1919
    2020---> TESTPOINT PASSED (psVector functions{PS_STAT_ROBUST_STATS: robust Median: no vector mask} | tst_psStats07.c)
     
    2626\**********************************************************************************/
    2727
    28 The expected Mode was 32.000000; the calculated Mode was 32.588655
     28The expected Mode was 32.00; the calculated Mode was 32.59
    2929
    3030---> TESTPOINT PASSED (psVector functions{PS_STAT_ROBUST_STATS: robust Mode: no vector mask} | tst_psStats07.c)
     
    3636\**********************************************************************************/
    3737
    38 The expected Stdev was 0.660000; the calculated Stdev was 0.655572
     38The expected Stdev was 0.66; the calculated Stdev was 0.66
    3939
    4040---> TESTPOINT PASSED (psVector functions{PS_STAT_ROBUST_STATS: robust Stdev: no vector mask} | tst_psStats07.c)
     
    4646\**********************************************************************************/
    4747
    48 The expected LQ was 30.799999; the calculated LQ was 30.018070
     48The expected LQ was 30.80; the calculated LQ was 30.02
    4949
    5050---> TESTPOINT PASSED (psVector functions{PS_STAT_ROBUST_STATS: lower quartile: no vector mask} | tst_psStats07.c)
     
    5656\**********************************************************************************/
    5757
    58 The expected UQ was 33.200001; the calculated UQ was 34.325886
     58The expected UQ was 33.20; the calculated UQ was 34.33
    5959
    6060---> TESTPOINT PASSED (psVector functions{PS_STAT_ROBUST_STATS: lower quartile: no vector mask} | tst_psStats07.c)
     
    6666\**********************************************************************************/
    6767
    68 The expected N50 was 143.000000; the calculated N50 was 143.000000
     68The expected N50 was 143.00; the calculated N50 was 143.00
    6969
    7070---> TESTPOINT PASSED (psVector functions{PS_STAT_ROBUST_STATS: robust N50: no vector mask} | tst_psStats07.c)
     
    7676\**********************************************************************************/
    7777
    78 The expected Nfit was 80.000000; the calculated Nfit was 80.000000
     78The expected Nfit was 80.00; the calculated Nfit was 80.00
    7979
    8080---> TESTPOINT PASSED (psVector functions{PS_STAT_ROBUST_STATS: robust Nfit: no vector mask} | tst_psStats07.c)
Note: See TracChangeset for help on using the changeset viewer.