Skip to content

Conversation

@forfudan
Copy link
Owner

@forfudan forfudan commented Jul 3, 2025

BigDecimal Enhancements:

  • Introduced unsafe methods for constructing BigDecimal from raw components (from_raw_components), with detailed documentation explaining their usage and risks.
  • Added new mathematical operations to BigDecimal, including arctan, power, and constants like pi and e. These additions expand the library's capabilities for advanced calculations. [1] [2]
  • Improved methods for printing BigDecimal representations, including print_representation_as_components, which provides a detailed breakdown of the number's components. [1] [2]

Mathematical Constants and Functions:

  • Added a precomputed constant PI_1024 for π to 1024 digits of precision and implemented a function pi(precision) to calculate π using Machin's formula for higher precision.
  • Updated the exp_taylor_series function in exponential.mojo to clarify the precision handling for natural exponential calculations.

Documentation Enhancements:

  • Added a detailed quick-start guide in README.md to showcase the decimojo.prelude module, including examples of basic arithmetic, mathematical functions, and internal representation of numbers. [1] [2]
  • Created a new example file docs/examples_on_bdec.mojo to demonstrate the usage of BigDecimal for arithmetic, mathematical, and internal representation operations.

@forfudan forfudan merged commit a195b9e into main Jul 3, 2025
1 check passed
@forfudan forfudan deleted the work branch July 3, 2025 16:07
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.

2 participants