BOOTSTRAP (klibm) functions
LIBRARY ROUTINE
kdata_arith2_long - perform 2-input long arithmetic
LIBRARY CALL
void kdata_arith2_long(
int mode,
int numpts,
long *data1,
long *data2,
long real,
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
- real - 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 "real" as the second operand.
Valid operations are KADD, KSUB, KSUBFROM, KMULT, KDIV,
KDIVINTO, KABSDIFF, KMODULO, KMINIMUM, and KMAXIMUM.
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 KMAXLINT 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_long to
kdata_arith2_long, moved to BOOTSTRAP::kmath, and
changed status from private to public.
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.