Skip to content

Commit 1b85e29

Browse files
committed
suggestions
1 parent 9cb10d2 commit 1b85e29

File tree

1 file changed

+2
-2
lines changed
  • content/stellar-contracts/utils/math

1 file changed

+2
-2
lines changed

content/stellar-contracts/utils/math/wad.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ of floating-point arithmetic in smart contracts.
1919

2020
# Why WAD?
2121

22-
## Problems with Alternatives
22+
## Shortcomings of Integers and Float Numbers
2323

2424
**Native Integers (`i128`, `u64`):**
2525
- No decimal support - `1/2 = 0` instead of `0.5`
@@ -355,7 +355,7 @@ fn safe_multiply(e: &Env, a: i128, b: i128) -> Result<i128, Error> {
355355
| `checked_add(rhs)` | `Option<Wad>` | Addition with overflow check |
356356
| `checked_sub(rhs)` | `Option<Wad>` | Subtraction with overflow check |
357357
| `checked_mul(e, rhs)` | `Option<Wad>` | Multiplication with overflow check (handles phantom overflow internally) |
358-
| `checked_div(rhs)` | `Option<Wad>` | Division with overflow/zero check |
358+
| `checked_div(e, rhs)` | `Option<Wad>` | Division with overflow/zero check |
359359
| `checked_mul_int(n)` | `Option<Wad>` | Integer multiplication with overflow check |
360360
| `checked_div_int(n)` | `Option<Wad>` | Integer division with zero check |
361361
| `checked_pow(e, exponent)` | `Option<Wad>` | Exponentiation with overflow check |

0 commit comments

Comments
 (0)