Skip to content

Conversation

@forfudan
Copy link
Owner

This pull request adds support for a new quantize function across various files and updates dependencies. The most important changes include the addition of the quantize function, updates to the mojoproject.toml file, and the inclusion of new benchmarks and tests.

Addition of quantize function:

  • src/decimojo/decimal.mojo: Added the quantize method to the Decimal struct to allow quantizing a Decimal to a specified exponent.
  • src/decimojo/rounding.mojo: Implemented the quantize function, which rounds a value according to the exponent of the second operand.

Updates to mojoproject.toml:

  • mojoproject.toml: Added the max dependency and included test_quantize and bench_quantize tasks.

Inclusion of new benchmarks and tests:

  • benches/bench.mojo: Added bench_quantize to the list of benchmarks.
  • src/decimojo/__init__.mojo: Updated imports to include the new quantize function.

@forfudan forfudan merged commit 2f1bdb3 into main Mar 20, 2025
1 check passed
@forfudan forfudan deleted the quantize branch March 20, 2025 21:59
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