Programmer Guide/SPU Reference/LOG: Difference between revisions
From STX Wiki
Jump to navigationJump to search
(initial import) |
m (1 revision: Initial import) |
(No difference)
|
Revision as of 17:31, 18 November 2010
Contents
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.