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

OUTPUT

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.