-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Issue
Packing order inconsistency between pack_2
and pack_3
functions.
Current Implementation
pack_3
: return (x[0] << 128) | (x[1] << 64) | x[2]
- First element (
x[0]
) → high bits (128-191) - Last element (
x[2]
) → low bits (0-63)
pack_2
: return p1 | (p2 << 128)
- First parameter (
p1
) → low bits (0-127) - Second parameter (
p2
) → high bits (128-255)
Problem
The ordering is reversed between functions:
pack_3
: first element → most significant bitspack_2
: first element → least significant bits
Recommendation
Standardize packing order. Either:
- Change
pack_2
:return (p1 << 128) | p2
- Or change
pack_3
:return x[0] | (x[1] << 64) | (x[2] << 128)
Option 1 preferred (first param in most significant bits).
Metadata
Metadata
Assignees
Labels
No labels