Skip to content

DeciMojo v0.3.0

Choose a tag to compare

@forfudan forfudan released this 15 Apr 09:56
· 38 commits to main since this release
f2930f0

DeciMojo v0.3.0 for Mojo 25.2

DeciMojo v0.3.0 introduces the arbitrary-precision BigDecimal type with comprehensive arithmetic operations, comparisons, and mathematical functions (sqrt, root, log, exp, power). A new tomlmojo package supports test refactoring. Improvements include refined BigUInt constructors, enhanced scale_up_by_power_of_10() functionality, and a critical multiplication bug fix.

⭐️ New

  • Implement the BigDecimal type with unlimited precision arithmetic.
    • Implement basic arithmetic operations for BigDecimal: addition, subtraction, multiplication, division, and modulo.
    • Implement comparison operations for BigDecimal: less than, greater than, equal to, and not equal to.
    • Implement string representation and parsing for BigDecimal.
    • Implement mathematical operations for BigDecimal: sqrt, nroot, log, exp, and power functions.
    • Iimplement rounding functions.
  • Implement a simple TOML parser as package tomlmojo to refactor tests (PR #63).

🦋 Changed

  • Refine the constructors of BigUInt (PR #64).
  • Improve the method BigUInt.scale_up_by_power_of_10() (PR #72).

🛠️ Fixed

  • Fix a bug in BigUInt multiplication where the calcualtion of carry is mistakenly skipped if a word of x2 is zero (PR #70).

What's Changed

  • [toml] Implement a TOML parser as package tomlmojo and use it to re-factor tests by @forfudan in #63
  • [integer] Refine the constructors of BigUInt by @forfudan in #64
  • [decimal] Implement some IO methods for BigDecimal by @forfudan in #65
  • [decimal] Implement add for BigDecimal by @forfudan in #66
  • [decimal] Implement a subtraction function for BigDecimal by @forfudan in #67
  • [decimal] Add tests for subtract() of BigDecimal by @forfudan in #68
  • [decimal] Implement multiply() for BigDecimal type by @forfudan in #69
  • [decimal] Implement true_divide for BigDecimal type + fix a bug in BigUInt.multiply by @forfudan in #70
  • [decimal][integer] Implement comparison operators for BigDecimal + Improve BigUInt.scale_up_by_power_of_10() by @forfudan in #72
  • [decimal] Implement sqrt for BigDecimal by @forfudan in #73
  • [decimal] Implement exp() for BigDecimal by @forfudan in #74
  • [decimal] Optimize exp for BigDecimal by @forfudan in #75
  • [decimal] Implement ln for BigDecimal by @forfudan in #76
  • [decimal] Implement power function for BigDecimal by @forfudan in #77
  • [docs] Update descriptions and examples by @forfudan in #78
  • [docs] Update descriptions and examples by @forfudan in #79
  • [decimal] Implement root() for BigDecimal by @forfudan in #80
  • [decimal][tests] Add tests for root() and power() of BigDecimal by @forfudan in #81
  • [integer] Remove multiply_toom_cook_3 for BigUInt by @forfudan in #82
  • [decimal] Implement round() for BigDecimal by @forfudan in #83
  • [docs] Update documents for release by @forfudan in #84

Full Changelog: v0.2.0...v0.3.0