BitOperations.Log2 Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Log2(UIntPtr) |
Returns the integer (floor) log of the specified value, base 2. |
Log2(UInt32) |
Returns the integer (floor) log of the specified value, base 2. |
Log2(UInt64) |
Returns the integer (floor) log of the specified value, base 2. |
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
Important
This API is not CLS-compliant.
Returns the integer (floor) log of the specified value, base 2.
public:
static int Log2(UIntPtr value);
[System.CLSCompliant(false)]
public static int Log2 (UIntPtr value);
[<System.CLSCompliant(false)>]
static member Log2 : unativeint -> int
Public Shared Function Log2 (value As UIntPtr) As Integer
Parameters
- value
-
UIntPtr
unativeint
The value.
Returns
The logarithm value.
- Attributes
Remarks
By convention, input value 0 returns 0 since log(0) is undefined.
Applies to
.NET 9 та інші версії
Продукт | Версії |
---|---|
.NET | 7, 8, 9 |
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
Important
This API is not CLS-compliant.
Returns the integer (floor) log of the specified value, base 2.
public:
static int Log2(System::UInt32 value);
[System.CLSCompliant(false)]
public static int Log2 (uint value);
[<System.CLSCompliant(false)>]
static member Log2 : uint32 -> int
Public Shared Function Log2 (value As UInteger) As Integer
Parameters
- value
- UInt32
The number from which to obtain the logarithm.
Returns
The log of the specified value, base 2.
- Attributes
Remarks
Note that by convention, input value 0 returns 0 since Log(0) is undefined.
Applies to
.NET 9 та інші версії
Продукт | Версії |
---|---|
.NET | Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
- Source:
- BitOperations.cs
Important
This API is not CLS-compliant.
Returns the integer (floor) log of the specified value, base 2.
public:
static int Log2(System::UInt64 value);
[System.CLSCompliant(false)]
public static int Log2 (ulong value);
[<System.CLSCompliant(false)>]
static member Log2 : uint64 -> int
Public Shared Function Log2 (value As ULong) As Integer
Parameters
- value
- UInt64
The number from which to obtain the logarithm.
Returns
The log of the specified value, base 2.
- Attributes
Remarks
Note that by convention, input value 0 returns 0 since Log(0) is undefined.
Applies to
.NET 9 та інші версії
Продукт | Версії |
---|---|
.NET | Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
Відгук про .NET
.NET – це проект із відкритим кодом. Виберіть посилання, щоб надати відгук: