Skip to content
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ For brevity, you can refer to it as "deci" (derived from the Latin root "decimus
When you add `from decimojo import dm, Decimal` at the top of your script, this imports the `decimojo` module into your namespace with the shorter alias `dm` and directly imports the `Decimal` type. This is equivalent to:

```mojo
import decimojo as dm
from decimojo import Decimal
from decimojo.prelude import dm, Decimal, RoundingMode
```

## Advantages
Expand Down Expand Up @@ -146,7 +145,7 @@ print(precise) # 0.1234567890123456789012345678

# Truncation to specific number of digits
var large_num = Decimal("123456.789")
print(truncate_to_digits(large_num, 4)) # 1235 (banker's rounded)
print(round_to_keep_first_n_digits(large_num, 4)) # 1235 (banker's rounded)
```

### 4. Sign Handling and Absolute Value
Expand Down
2 changes: 1 addition & 1 deletion benches/bench_add.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Comprehensive benchmarks for Decimal addition operations.
Compares performance against Python's decimal module.
"""

from decimojo import dm, Decimal
from decimojo.prelude import dm, Decimal, RoundingMode
from python import Python, PythonObject
from time import perf_counter_ns
import time
Expand Down
2 changes: 1 addition & 1 deletion benches/bench_divide.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Comprehensive benchmarks for Decimal division operations.
Compares performance against Python's decimal module.
"""

from decimojo import dm, Decimal
from decimojo.prelude import dm, Decimal, RoundingMode
from python import Python, PythonObject
from time import perf_counter_ns
import time
Expand Down
2 changes: 1 addition & 1 deletion benches/bench_multiply.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Comprehensive benchmarks for Decimal multiplication operations.
Compares performance against Python's decimal module.
"""

from decimojo import dm, Decimal
from decimojo.prelude import dm, Decimal, RoundingMode
from python import Python, PythonObject
from time import perf_counter_ns
import time
Expand Down
Loading