LOG

From STX Wiki
< Programmer Guide‎ | SPU Reference
Revision as of 14:05, 17 May 2010 by 193.171.195.8 (talk) (initial import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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