Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ public struct OpIsZero : IOpMath1Param
/// </summary>
public struct OpCLZ : IOpMath1Param
{
Copy link

Copilot AI Jul 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GasCost property lacks documentation explaining the gas cost value and its relation to the EIP-9987 specification change from 3 to 5 gas units.

Suggested change
{
{
/// <summary>
/// Gas cost for the CLZ (Count Leading Zeros) operation.
/// Updated to 5 gas units as per EIP-9987, which increased the cost from the previous value of 3 gas units.
/// </summary>

Copilot uses AI. Check for mistakes.
static long GasCost => GasCostOf.Low;

public static Word Operation(Word value) => value == default
? Vector256.Create((byte)0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0)
: Vector256.Create(0UL, 0UL, 0UL, (ulong)value.CountLeadingZeroBits() << 56).AsByte();
Expand Down