/*Translated by FOR_C, v3.4.2 (-), on 07/09/115 at 08:30:03 */ /*FOR_C Options SET: ftn=u io=c no=p op=aimnv s=dbov str=l x=f - prototypes */ #include #include "fcrt.h" #include "cpro.h" #include void /*FUNCTION*/ cpro( float z1[], float z2[], float result[]) { float temp; /* OFFSET Vectors w/subscript range: 1 to dimension */ float *const Result = &result[0] - 1; float *const Z1 = &z1[0] - 1; float *const Z2 = &z2[0] - 1; /* end of OFFSET VECTORS */ /* Copyright (c) 1996 California Institute of Technology, Pasadena, CA. * ALL RIGHTS RESERVED. * Based on Government Sponsored Research NAS7-03001. *>> 1995-10-30 CPRO Krogh Fixed so M77CON can get S.P. for C conv. *>> 1987-12-07 CPRO Lawson Initial code. *--C replaces "?": ?PRO * * Computes the product of two double precision complex numbers. * Computes W = U * V where the data is given as * Z1(1) = Real part of U * Z1(2) = Imaginary part of U * Z2(1) = Real part of V * Z2(2) = Imaginary part of V * Result returned as * RESULT(1) = Real part of W * RESULT(2) = Imaginary part of W * * C.L.Lawson & S.Chan, JPL, Feb 17, 1987. * ------------------------------------------------------------------ * */ temp = Z1[1]*Z2[1] - Z1[2]*Z2[2]; Result[2] = Z1[1]*Z2[2] + Z1[2]*Z2[1]; Result[1] = temp; return; } /* end of function */