/*Translated by FOR_C, v3.4.2 (-), on 07/09/115 at 08:33:20 */ /*FOR_C Options SET: ftn=u io=c no=p op=aimnv pf=,p_xblas s=dbov str=l x=f - prototypes */ #include #include "fcrt.h" #include #include #include "p_xblas.h" /* program DRXBLAS *>> 1996-05-28 DRXBLAS Krogh Added external statement. *>> 1992-03-13 CLL * DRXBLAS.. Demo driver for DSDOT and SDSDOT * ------------------------------------------------------------------ */ int main( ) { long int n; float s1; double d1; static float x[4]={4.0,-7.0,3.0,-9.0}; static float y[4]={-2.0,-8.0,5.0,6.0}; /* OFFSET Vectors w/subscript range: 1 to dimension */ float *const X = &x[0] - 1; float *const Y = &y[0] - 1; /* end of OFFSET VECTORS */ /* ------------------------------------------------------------------ */ printf(" DRXBLAS.. Demo driver for DSDOT and SDSDOT\n" " These subprograms accept SP data but use DP arithmetic.\n"); n = 4; s1 = sdsdot( n, -9.0e0, x, 1, y, 1 ); d1 = -9.0e0 + dsdot( n, x, 1, y, 1 ); printf("\n Using SDSDOT and DSDOT. Expect S1 = D1 = 0.0\n"); printf(" Computed: S1 =%8.2f, D1 =%8.2f\n", s1, d1); exit(0); } /* end of function */