BOOTSTRAP (klibm) functions
LIBRARY ROUTINE
kdata_arith2_dcomplex - perform 2-input double complex arithmetic
LIBRARY CALL
void kdata_arith2_dcomplex(
int mode,
int numpts,
kdcomplex *data1,
kdcomplex *data2,
kdcomplex complex,
unsigned char *mask1,
unsigned char *mask2 )
INPUT
- mode - operation to be performed
- numpts - number of points in data1, mask1, data2 and mask2
- data1 - first data array and first operand
- data2 - second data array and second operand
- complex - second operand if data2 array is not valid
- mask1 - mask associated with first data array
- mask2 - mask associated with second data array
OUTPUT
- data1 - data results are stored in data1
- mask1 - if a mask exists, results are stored in mask1
RETURN VALUE
nothing
DESCRIPTION
This function performs the operation defined by "mode"
using data in array "data1" as the first operand, and
data in array "data2", if it is valid, as the second
operand. If "data2" is not valid, the operation will
be performed using the value "complex" as the second
operand. Valid operations are KADD, KSUB, KSUBFROM,
KMULT, KDIV, KDIVINTO, and KPOW.
This function assumes that both input arrays, data1 and
data2, are valid, and that if either mask1 or mask2 is
passed in, then both masks have been passed in. If just
data1 is valid, only mask1 is expected.
Potential division by zero is checked, and KMAXFLOAT is
returned instead.
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
None
RESTRICTIONS
none
MODIFICATION
May 2 1994 - Removed gating input option.
Added functionality for KSUBFROM and KDIVINTO cases.
Feb 14 1995 - Changed name from karith2_dcomplex to
kdata_arith2_dcomplex, moved to BOOTSTRAP::kmath, and
changed status from private to public.
March 14, 1995 - added double complex power function
FILES
$BOOTSTRAP/objects/library/klibm/src/kdata_arith2.c
SEE ALSO
klibm(3)
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.