共用方式為


TensorPrimitives.Log 方法

定義

多載

Log(ReadOnlySpan<Single>, Span<Single>)

計算指定張量中單精度浮點數的元素明智自然(基底 e) 對數。

Log<T>(ReadOnlySpan<T>, T, Span<T>)

將指定張量中的數字元素對數計算到另一個指定張量中的指定基底。

Log<T>(ReadOnlySpan<T>, Span<T>)

計算指定張量中的元素自然數(基底 e) 對數。

Log<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, Span<T>)

將指定張量中的數字元素對數計算到另一個指定張量中的指定基底。

Log(ReadOnlySpan<Single>, Span<Single>)

來源:
TensorPrimitives.cs
來源:
TensorPrimitives.Single.cs
來源:
TensorPrimitives.Single.cs

計算指定張量中單精度浮點數的元素明智自然(基底 e) 對數。

public:
 static void Log(ReadOnlySpan<float> x, Span<float> destination);
public static void Log(ReadOnlySpan<float> x, Span<float> destination);
static member Log : ReadOnlySpan<single> * Span<single> -> unit
Public Shared Sub Log (x As ReadOnlySpan(Of Single), destination As Span(Of Single))

參數

x
ReadOnlySpan<Single>

以範圍表示的張量。

destination
Span<Single>

目的地張量,以範圍表示。

例外狀況

xdestination 參考重疊的記憶體位置,而且不會從相同的位置開始。

備註

這個方法會有效地計算 destination[i] = MathF.Log(x[i])

如果值等於 0,則儲存至對應目的地位置的結果會設定為 NegativeInfinity。 如果值為負數或等於 NaN,則儲存至對應目的地位置的結果會設定為 NaN。 如果值為正無限大,則儲存至對應目的地位置的結果會設定為 PositiveInfinity。 否則,如果值為正數,其自然對數會儲存到對應的目的地位置。

這個方法可能會呼叫基礎 C 運行時間,或採用目前架構特有的指示。 不同操作系統或架構之間的確切結果可能會有所不同。

適用於

Log<T>(ReadOnlySpan<T>, T, Span<T>)

來源:
TensorPrimitives.Log.cs
來源:
TensorPrimitives.Log.cs

將指定張量中的數字元素對數計算到另一個指定張量中的指定基底。

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

類型參數

T

參數

x
ReadOnlySpan<T>

第一個張量,以範圍表示。

y
T

第二個張量,以純量表示。

destination
Span<T>

目的地張量,以範圍表示。

例外狀況

xdestination 參考重疊的記憶體位置,而且不會從相同的位置開始。

備註

這個方法會有效地計算 destination[i] = T.Log(x[i], y)

這個方法可能會呼叫基礎 C 運行時間,或採用目前架構特有的指示。 不同操作系統或架構之間的確切結果可能會有所不同。

適用於

Log<T>(ReadOnlySpan<T>, Span<T>)

來源:
TensorPrimitives.Log.cs
來源:
TensorPrimitives.Log.cs

計算指定張量中的元素自然數(基底 e) 對數。

public:
generic <typename T>
 where T : System::Numerics::ILogarithmicFunctions<T> static void Log(ReadOnlySpan<T> x, Span<T> destination);
public static void Log<T>(ReadOnlySpan<T> x, Span<T> destination) where T : System.Numerics.ILogarithmicFunctions<T>;
static member Log : 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 Log(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.Log(x[i])

如果值等於 0,則儲存至對應目的地位置的結果會設定為 NegativeInfinity。 如果值為負數或等於 NaN,則儲存至對應目的地位置的結果會設定為 NaN。 如果值為正無限大,則儲存至對應目的地位置的結果會設定為 PositiveInfinity。 否則,如果值為正數,其自然對數會儲存到對應的目的地位置。

這個方法可能會呼叫基礎 C 運行時間,或採用目前架構特有的指示。 不同操作系統或架構之間的確切結果可能會有所不同。

適用於

Log<T>(ReadOnlySpan<T>, ReadOnlySpan<T>, Span<T>)

來源:
TensorPrimitives.Log.cs
來源:
TensorPrimitives.Log.cs

將指定張量中的數字元素對數計算到另一個指定張量中的指定基底。

public:
generic <typename T>
 where T : System::Numerics::ILogarithmicFunctions<T> static void Log(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination);
public static void Log<T>(ReadOnlySpan<T> x, ReadOnlySpan<T> y, Span<T> destination) where T : System.Numerics.ILogarithmicFunctions<T>;
static member Log : ReadOnlySpan<'T (requires 'T :> System.Numerics.ILogarithmicFunctions<'T>)> * 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 Log(Of T As ILogarithmicFunctions(Of T)) (x As ReadOnlySpan(Of T), y As ReadOnlySpan(Of T), destination As Span(Of T))

類型參數

T

參數

x
ReadOnlySpan<T>

第一個張量,以範圍表示。

y
ReadOnlySpan<T>

第二個張量,以範圍表示。

destination
Span<T>

目的地張量,以範圍表示。

例外狀況

ydestination 參考重疊的記憶體位置,而且不會從相同的位置開始。

備註

這個方法會有效地計算 destination[i] = T.Log(x[i], y[i])

這個方法可能會呼叫基礎 C 運行時間,或採用目前架構特有的指示。 不同操作系統或架構之間的確切結果可能會有所不同。

適用於