Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Sep 13, 2025

Summary

This PR removes the unused Factorial method and related code as requested in issue #59. After analysis, I confirmed that:

  • The Factorial method is no longer used anywhere in the LinksPlatform ecosystem
  • The Catalan method now uses precalculated values and doesn't depend on Factorial calculations
  • Only usage was in performance benchmarks within the Numbers repository itself

Changes Made

  • ✅ Removed the Factorial<TLinkAddress> method from Math.cs
  • ✅ Removed the _factorials array (no longer needed)
  • ✅ Removed the MaximumFactorialNumber constant
  • ✅ Removed the CurrentFactorialImplementation benchmark test
  • ✅ Maintained all existing functionality for Catalan and IsPowerOfTwo methods
  • ✅ All tests pass after removal

Test Plan

  • Build succeeds with no errors
  • All existing tests continue to pass
  • Catalan method works correctly with precalculated values
  • IsPowerOfTwo method remains unaffected
  • Benchmarks can still run (other factorial alternative implementations remain for comparison)

Verification

The removal was verified by:

  1. Searching the entire LinksPlatform ecosystem - no external usage found
  2. Confirming Catalan method uses _catalans array, not factorial calculations
  3. Running full test suite to ensure no regressions
  4. Building successfully after removal

Fixes #59

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #59
@konard konard self-assigned this Sep 13, 2025
The Factorial method is no longer used in the LinksPlatform ecosystem as the Catalan method now uses precalculated values instead of depending on factorial calculations. This change:

- Removes the unused Factorial method from Math.cs
- Removes the _factorials array and MaximumFactorialNumber constant
- Removes the CurrentFactorialImplementation benchmark test
- Maintains all existing functionality for Catalan and IsPowerOfTwo methods

Fixes #59

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] Factorial method is not used anymore in the LinksPlatform, can we delete it? Remove unused Factorial method and related code Sep 13, 2025
@konard konard marked this pull request as ready for review September 13, 2025 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Factorial method is not used anymore in the LinksPlatform, can we delete it?

2 participants