DATAMANIP (kdatamanip) functions


LIBRARY ROUTINE

lkarith1 - perform single operand arithmetic on data object

LIBRARY CALL

int lkarith1(
   kobject src_obj,
   char    *function,
   kobject dst_obj)

INPUT

OUTPUT

RETURN VALUE

TRUE (1) on success, FALSE (0) otherwise

DESCRIPTION

The following is the library routine that performs a unary function on a data object. The routine takes an input data object, a function name, and an output data object in which to store the result of the function.

The supported functions are:

.TS
center tab(:) ;
l l .
abs   :  Output is Absolute Value of input
sqrt  :  Output is Square Root of input
cbrt  :  Output is Cube Root of input
neg   :  Output is Negative of input
recip :  Output is Reciprocal of input
not   :  Bitwise NOT operation
clear :  Bitwise CLEAR - set all valid bits to 0
set   :  Bitwise SET - set all valid bits to 1
sin   :  Output is the sine() of the input
asin  :  Output is the arc sine() of the input
cos   :  Output is the cosine() of the input
acos  :  Output is arc cosine() of the input
tan   :  Output is tangent() of the input
atan  :  Output is arc tangent() of the input
sinh  :  Output is hyperbolic sine() of the input
asinh :  Output is hyperbolic arc sine() of the input
cosh  :  Output is hyperbolic cosine() of the input
acosh :  Output is arc hyperbolic cosine() of the input
tanh  :  Output is hyperbolic tangent() of the input
atanh :  Output is hyperbolic tangent() of the input
sinc  :  Output is sin(x)/x of the input
ceil  :  Output is ceiling of the input
floor :  Output is floor of the input
trunc :  Output is interger truncate of the input
fract :  Output is fractional part of the input
lgamma:  Output is the lgamma function of the input
erfc  :  Output is 1.0-erf(x)
erf   :  Output is error function of x where 
:  erf(x)=2/sqrt(pi)*integralfrom0
.TE
If lkarith1() were called with:

lkarith1(i, "sin", o);

then the following would be performed:

o = sin(i);

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

$DATAMANIP/objects/library/kdatamanip/src/lkarith1.c

SEE ALSO

kdatamanip(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.