tact-lang / tact-docs

Tact main documentation
https://docs.tact-lang.org
54 stars 41 forks source link

Correct the result of `two / 1` in operators.mdx #177

Closed Polaristow closed 5 months ago

Polaristow commented 5 months ago
let two: Int = 2;
two / 2; // 1
two / 1; // 0
-1 / 5;  // -1

two / 1; // 0 This is the integer division of 2 by 1, which is 2. However, it seems the comment claims the result to be 0, which is incorrect. The correct result is indeed 2.

anton-trunov commented 5 months ago

Hi @Polaristow, thanks for the fix! Your contribution qualifies for this SBT: https://society.ton.org/contribute-to-tact-compiler. Please share your TON wallet address if you'd like to get it

Polaristow commented 5 months ago

@anton-trunov Thank you! Here is my TON address: UQDZHDBhW86zf_KmfzJqYgbm26-kPupcaZFWczbx4r401gE2.

anton-trunov commented 5 months ago

Should be done now!