logb

From DavinciWiki
Jump to: navigation, search

Description

Arbitrary logarithm.

Arguments and Return Values

Arguments: Two numeric arrays (any format). The first input is the base for the logarithm; the second is the values for which the logarithm is to be taken.

Return Value: A numeric array containing the log (with the specified base) of the input; output format is double if input is double, float otherwise

If no arguments are input, logb() prints its description, as shown below.

Usage

Syntax: logb(b,x)

'b', 'x' - numeric arrays (any format)

Examples

dv> logb()

Logarithm with arbitrary base
logb(b,x) returns ln(x)/ln(b)
Note that the base is the first input
Works for arrays
S.Marshall 12-06-2007

0
dv> logb(3,9)
2.00000
dv> logb(9,3)
0.500000
dv> logb(0.5,0.5//1.//1.5//2.)
4x1x1 array of float, bsq format [16 bytes]
1.00000 -0.00000        -0.584962       -1.00000
dv> logb(2//4,8)
2x1x1 array of float, bsq format [8 bytes]
3.00000 1.50000
dv> logb(2//3,4//9)
2x1x1 array of float, bsq format [8 bytes]
2.00000 2.00000

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Major Sub-Functions

Related Functions

Recent Library Changes

Created On: 12-07-2007
Modified On: 01-17-2008

Personal tools