LOG

From STX Wiki
< Programmer Guide‎ | SPU Reference
Revision as of 17:31, 18 November 2010 by Admin (talk | contribs) (1 revision: Initial import)
Jump to navigationJump to search

LOG

Usage:

LOG a b

Inputs:
a number or vector
b number or vector
Outputs:
y number or vector (same type as a)
Function:

Compute logarithm of a to base b.

if a and b are numbers: y = logb(a)

if a is a vector and b a number: y[i] = logb(a[i])

if a and b are vectors: y[i] = logb[i](a[i])

Both a|a[i] and b|b[i] must be greater than zero (otherwise the result is set to 0). If a|a[i] is smaller than the smallest number representable in single precision, the logarithm is set to the exponent of this number.

Navigation menu

Personal tools