Jaa


TensorPrimitives.Log Method

Definition

Overloads

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

Computes the element-wise natural (base e) logarithm of single-precision floating-point numbers in the specified tensor.

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

Computes the element-wise logarithm of the numbers in a specified tensor to the specified base in another specified tensor.

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

Computes the element-wise natural (base e) logarithm of numbers in the specified tensor.

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

Computes the element-wise logarithm of the numbers in a specified tensor to the specified base in another specified tensor.

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

Source:
TensorPrimitives.cs
Source:
TensorPrimitives.Single.cs
Source:
TensorPrimitives.Single.cs

Computes the element-wise natural (base e) logarithm of single-precision floating-point numbers in the specified tensor.

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))

Parameters

x
ReadOnlySpan<Single>

The tensor, represented as a span.

destination
Span<Single>

The destination tensor, represented as a span.

Exceptions

x and destination reference overlapping memory locations and do not begin at the same location.

Remarks

This method effectively computes destination[i] = MathF.Log(x[i]).

If a value equals 0, the result stored into the corresponding destination location is set to NegativeInfinity. If a value is negative or equal to NaN, the result stored into the corresponding destination location is set to NaN. If a value is positive infinity, the result stored into the corresponding destination location is set to PositiveInfinity. Otherwise, if a value is positive, its natural logarithm is stored into the corresponding destination location.

This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures.

Applies to

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

Source:
TensorPrimitives.Log.cs
Source:
TensorPrimitives.Log.cs

Computes the element-wise logarithm of the numbers in a specified tensor to the specified base in another specified tensor.

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))

Type Parameters

T

Parameters

x
ReadOnlySpan<T>

The first tensor, represented as a span.

y
T

The second tensor, represented as a scalar.

destination
Span<T>

The destination tensor, represented as a span.

Exceptions

x and destination reference overlapping memory locations and do not begin at the same location.

Remarks

This method effectively computes destination[i] = T.Log(x[i], y).

This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures.

Applies to

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

Source:
TensorPrimitives.Log.cs
Source:
TensorPrimitives.Log.cs

Computes the element-wise natural (base e) logarithm of numbers in the specified tensor.

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))

Type Parameters

T

Parameters

x
ReadOnlySpan<T>

The tensor, represented as a span.

destination
Span<T>

The destination tensor, represented as a span.

Exceptions

x and destination reference overlapping memory locations and do not begin at the same location.

Remarks

This method effectively computes destination[i] = T.Log(x[i]).

If a value equals 0, the result stored into the corresponding destination location is set to NegativeInfinity. If a value is negative or equal to NaN, the result stored into the corresponding destination location is set to NaN. If a value is positive infinity, the result stored into the corresponding destination location is set to PositiveInfinity. Otherwise, if a value is positive, its natural logarithm is stored into the corresponding destination location.

This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures.

Applies to

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

Source:
TensorPrimitives.Log.cs
Source:
TensorPrimitives.Log.cs

Computes the element-wise logarithm of the numbers in a specified tensor to the specified base in another specified tensor.

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))

Type Parameters

T

Parameters

x
ReadOnlySpan<T>

The first tensor, represented as a span.

y
ReadOnlySpan<T>

The second tensor, represented as a span.

destination
Span<T>

The destination tensor, represented as a span.

Exceptions

y and destination reference overlapping memory locations and do not begin at the same location.

Remarks

This method effectively computes destination[i] = T.Log(x[i], y[i]).

This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures.

Applies to