BOOTSTRAP (klibm) functions
LIBRARY ROUTINE
kdata_arith2_ulong - perform 2-input unsigned long arithmetic
LIBRARY CALL
void kdata_arith2_ulong(
int mode,
int numpts,
unsigned long *data1,
unsigned long *data2,
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
- 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" 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.
Potential division by zero is checked, and the maximum
unsigned long value [2**(sizeof(unsigned long)) -1]
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_ulong to
kdata_arith2_ulong, 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.