Commit 5e1bc02
authored
This pull request introduces several enhancements and fixes to the
`bigdecimal` module, including the addition of a new natural logarithm
function, renaming and refactoring of existing methods for clarity, and
updates to dependencies and test cases.
### New Features:
* Added a natural logarithm function to the `bigdecimal` module (`ln`).
[[1]](diffhunk://#diff-be2f9b2702fd15952546e17fe94a64c22902a0e4678bfd9cb925269647923db4R545-R549)
[[2]](diffhunk://#diff-8edc842002d08323642db57f775ff7f626be068d55cb55bbe637e215f68ed8bcR349-R580)
### Method Renaming and Refactoring:
* Renamed `true_divide_fast` to `true_divide_inexact` and updated its
implementation to use `number_of_significant_digits` instead of
`minimum_precision`.
[[1]](diffhunk://#diff-f79534f4e7fdd891932ce9d015c50bd3c8a72c4a1689f0cb55524490ffc0458dL334-L359)
[[2]](diffhunk://#diff-f79534f4e7fdd891932ce9d015c50bd3c8a72c4a1689f0cb55524490ffc0458dL370-R363)
[[3]](diffhunk://#diff-f79534f4e7fdd891932ce9d015c50bd3c8a72c4a1689f0cb55524490ffc0458dL379-L384)
[[4]](diffhunk://#diff-f79534f4e7fdd891932ce9d015c50bd3c8a72c4a1689f0cb55524490ffc0458dL396-R391)
[[5]](diffhunk://#diff-be2f9b2702fd15952546e17fe94a64c22902a0e4678bfd9cb925269647923db4L570-R582)
[[6]](diffhunk://#diff-8edc842002d08323642db57f775ff7f626be068d55cb55bbe637e215f68ed8bcL124-R124)
[[7]](diffhunk://#diff-8edc842002d08323642db57f775ff7f626be068d55cb55bbe637e215f68ed8bcL233-R233)
[[8]](diffhunk://#diff-8edc842002d08323642db57f775ff7f626be068d55cb55bbe637e215f68ed8bcL321-R321)
### Dependency Updates:
* Added `mpmath` as a new dependency in `mojoproject.toml`.
### Error Message Improvements:
* Enhanced error messages in `BigUInt` struct methods for better
clarity.
[[1]](diffhunk://#diff-f9432b9b2671643af91201f9e3f011551a3d3b0e6d7b256d0d4569f5ae59848aL230-R230)
[[2]](diffhunk://#diff-f9432b9b2671643af91201f9e3f011551a3d3b0e6d7b256d0d4569f5ae59848aL280-R287)
### Test Case Updates:
* Updated test cases to include tests for the natural logarithm
function.
1 parent 60980a8 commit 5e1bc02
10 files changed
Lines changed: 1200 additions & 45 deletions
File tree
- benches/bigdecimal
- src/decimojo
- bigdecimal
- biguint
- tests/bigdecimal
- test_data
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| 44 | + | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
| 53 | + | |
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
| |||
0 commit comments