From ec61146d1a4d2dfaeb17856ced4f55cf61221ba3 Mon Sep 17 00:00:00 2001 From: konard Date: Thu, 11 Sep 2025 12:17:30 +0300 Subject: [PATCH 1/3] Initial commit with task details for issue #106 Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: https://github.com/linksplatform/Numbers/issues/106 --- CLAUDE.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..9eaca6f --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,5 @@ +Issue to solve: https://github.com/linksplatform/Numbers/issues/106 +Your prepared branch: issue-106-48d2da31 +Your prepared working directory: /tmp/gh-issue-solver-1757582242181 + +Proceed. \ No newline at end of file From 00700777791bc7b71f21ff4308edd4b4b2d9d97c Mon Sep 17 00:00:00 2001 From: konard Date: Thu, 11 Sep 2025 12:17:49 +0300 Subject: [PATCH 2/3] Remove CLAUDE.md - PR created successfully --- CLAUDE.md | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index 9eaca6f..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,5 +0,0 @@ -Issue to solve: https://github.com/linksplatform/Numbers/issues/106 -Your prepared branch: issue-106-48d2da31 -Your prepared working directory: /tmp/gh-issue-solver-1757582242181 - -Proceed. \ No newline at end of file From abd1db7720a4764af4ae83e82d5bd77655ac7a6c Mon Sep 17 00:00:00 2001 From: konard Date: Thu, 11 Sep 2025 12:22:49 +0300 Subject: [PATCH 3/3] Replace hardcoded 32 with BitsSize in Bit methods MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace hardcoded 32 values with BitsSize field in PartialWrite and PartialRead methods - This makes the code generic and work correctly for different numeric types - All tests pass after the change Fixes #106 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- csharp/Platform.Numbers/Bit[T].cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/csharp/Platform.Numbers/Bit[T].cs b/csharp/Platform.Numbers/Bit[T].cs index 8e8b752..ec6ee07 100644 --- a/csharp/Platform.Numbers/Bit[T].cs +++ b/csharp/Platform.Numbers/Bit[T].cs @@ -26,11 +26,11 @@ public static T PartialWrite(T target, T source, int shift, int limit) { if (shift < 0) { - shift = 32 + shift; + shift = BitsSize + shift; } if (limit < 0) { - limit = 32 + limit; + limit = BitsSize + limit; } var sourceMask = ~(T.MaxValue << limit) & T.MaxValue; var targetMask = ~(sourceMask << shift); @@ -40,11 +40,11 @@ public static T PartialRead(T target, int shift, int limit) { if (shift < 0) { - shift = 32 + shift; + shift = BitsSize + shift; } if (limit < 0) { - limit = 32 + limit; + limit = BitsSize + limit; } var sourceMask = ~(T.MaxValue << limit) & T.MaxValue; var targetMask = sourceMask << shift;