TensorPrimitives.Log10<T>(ReadOnlySpan<T>, Span<T>) 方法

定义

计算指定张量中的以元素为底的 10 个数字对数。

public:
generic <typename T>
 where T : System::Numerics::ILogarithmicFunctions<T> static void Log10(ReadOnlySpan<T> x, Span<T> destination);
public static void Log10<T> (ReadOnlySpan<T> x, Span<T> destination) where T : System.Numerics.ILogarithmicFunctions<T>;
static member Log10 : ReadOnlySpan<'T (requires 'T :> System.Numerics.ILogarithmicFunctions<'T>)> * Span<'T (requires 'T :> System.Numerics.ILogarithmicFunctions<'T>)> -> unit (requires 'T :> System.Numerics.ILogarithmicFunctions<'T>)
Public Shared Sub Log10(Of T As ILogarithmicFunctions(Of T)) (x As ReadOnlySpan(Of T), destination As Span(Of T))

类型参数

T

参数

x
ReadOnlySpan<T>

张量,表示为范围。

destination
Span<T>

目标张量,表示为范围。

例外

xdestination 引用重叠的内存位置,并且不在同一位置开始。

注解

此方法有效地计算 destination[i] = T.Log10(x[i])

如果值等于 0,则存储在相应目标位置的结果将设置为 NegativeInfinity。 如果值为负或等于 NaN,则存储在相应目标位置的结果设置为 NaN。 如果值为正无穷大,则存储在相应目标位置的结果将设置为 PositiveInfinity。 否则,如果某个值为正值,则其基数 10 对数将存储到相应的目标位置。

此方法可以调用基础 C 运行时,或使用特定于当前体系结构的说明。 不同的操作系统或体系结构之间的确切结果可能有所不同。

适用于