Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[1.0.0] - 2025-07-21

Added

  • BitLength.of/1 function for calculating bit length of integers
  • Comprehensive module and function documentation
  • Mathematical algorithm explanation with LaTeX notation
  • Performance characteristics documentation
  • Type specifications with @spec annotations

Features

  • Calculates minimum bits required to represent integers in binary
  • Handles special case for 0 (returns 0)
  • Uses mathematical approach: floor(log₂(n)) + 1 for positive integers
  • O(1) performance using :math.log2/1

Documentation

  • Complete module documentation with examples
  • Detailed function documentation with parameters and return types
  • Algorithm explanation with mathematical formulas
  • Performance analysis and characteristics
  • Binary representation examples for clarity

Development

  • Credo static code analysis configuration
  • Dialyzer type checking setup
  • ExDoc documentation generation
  • Spellweaver spell checking integration
  • Comprehensive mix check alias for quality assurance
  • Apache 2.0 license
  • Professional project structure

Examples

BitLength.of(0)    # Returns: 0
BitLength.of(1)    # Returns: 1
BitLength.of(2)    # Returns: 2
BitLength.of(3)    # Returns: 2
BitLength.of(7)    # Returns: 3
BitLength.of(8)    # Returns: 4
BitLength.of(255)  # Returns: 8
BitLength.of(256)  # Returns: 9
BitLength.of(1023) # Returns: 10
BitLength.of(1024) # Returns: 11

Version History

  • 1.0.0 - First stable release with complete functionality

Contributing

When contributing to this project, please update this changelog by adding a new entry under the [Unreleased] section. Follow the format established in this file.

Changelog Entry Types

  • Added - New features
  • Changed - Changes in existing functionality
  • Deprecated - Soon-to-be removed features
  • Removed - Removed features
  • Fixed - Bug fixes
  • Security - Vulnerability fixes