Skip to content

Commit 5b3e1ae

Browse files
authored
Add/subtract methods maintain the precision of 1st arg
1 parent 5a2d7cd commit 5b3e1ae

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ All methods do not modify the input arguments, returning a new BigDecimal, unles
6262
| `FromNumber(n)` | Creates a BigDecimal from a JavaScript number. |
6363
| `FromBigInt(n)` | Creates a BigDecimal from a native BigInt. |
6464
| **Arithmetic** | |
65-
| `add(a, b)` | Adds two BigDecimals. |
66-
| `subtract(a, b)` | Subtracts `b` from `a`. |
65+
| `add(a, b)` | Adds two BigDecimals, maintaining the precision of the first argument. |
66+
| `subtract(a, b)` | Subtracts `b` from `a`, maintaining the precision of `a`. |
6767
| `multiply_fixed(a, b)` | Multiplies maintaining precision of the first argument. |
6868
| `multiply_floating(a, b)` | Multiplies and normalizes the precision to a standard mantissa size (handles scale changes nicely). |
6969
| `divide_fixed(a, b)` | Divides `a` by `b` maintaining precision of the first argument. |

0 commit comments

Comments
 (0)