Name
log10 - returns the base-10 logarithm of scalars and vectors
Synopsis
float log10(float a);
float1 log10(float1 a);
float2 log10(float2 a);
float3 log10(float3 a);
float4 log10(float4 a);
half log10(half a);
half1 log10(half1 a);
half2 log10(half2 a);
half3 log10(half3 a);
half4 log10(half4 a);
fixed log10(fixed a);
fixed1 log10(fixed1 a);
fixed2 log10(fixed2 a);
fixed3 log10(fixed3 a);
fixed4 log10(fixed4 a);
Parameters
- a
-
Vector or scalar of which to determine the base-10 logarithm.
Description
Returns the base-10 logarithm a.
For vectors, the returned vector contains the base-10 logarithm of each
element of the input vector.
Reference Implementation
float3 log10(float3 a)
{
float3 rv;
int i;
for (i=0; i<3; i++) {
rv[i] = log10(a[i]); // this is the ANSI C standard library log10()
}
return rv;
}
log10 is typically implemented with a native base-10 logarithm instruction.
Profile Support
log10 is fully supported in all profiles unless otherwise specified.
Support in the fp20 is limited to constant compile-time evaluation.
See Also
exp, log, log2, pow
|