DATAMANIP commands
PROGRAM NAME
klog - Compute Logarithm
DESCRIPTION
klog
computes the logarithm of an object element by element. If the
object has an associated mask, the operation will be gated so that
the logarithm is computed only on valid elements, indicated by non-zero
mask values. A zero mask value will cause the value of the corresponding
element in the input object to be transferred the output object.
Three standard-base logarithms are provided, and alternate bases
can be specified using the -base option.
be
returns the natural logarithm of x, and
b2
and
b10
return the logarithm to base 2 and 10 respectively.
The -offset option can be set to TRUE if the logarithm is to
operate on the input value plus 1 (log(x+1)). This improves accuracy for
very small input values.
If the argument to the log is less than or equal to zero, then a large
negative number is returned (-1.0e38).
If the input object has a map, then only the map values are modified, and the
vlaue data is not touched.
REQUIRED ARGUMENTS
- -i
-
type: infile
desc: input data object
- -o
-
type: outfile
desc: resulting output data object
Mutually Exclusive Group; you must specify ONE of:
- -be
-
type: flag
desc: Compute logarithm using natural base 2.71828...
OR
- -b10
-
type: flag
desc: Compute logarithm using base 10
OR
- -b2
-
type: flag
desc: Compute logarithm using base 2
OR
- -base
-
type: double
desc: User Specified base
default: 2
bounds: no range checking
OPTIONAL ARGUMENTS
- -offset
-
type: boolean
desc: Operate either on value [False] or value+1 [True]
default: true
EXAMPLES
SEE ALSO
DATAMANIP::klogexp
RESTRICTIONS
REFERENCES
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.