You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In 04-Semantics-Operators.ipynb the // operator is described as
a // b | Floor division | Quotient of a and b, removing fractional parts
and
Floor division is true division with fractional parts truncated
Which works for the examples provided. However, in an active Jupyter notebook with negative numbers we see
-5/2 => -2.5
and
-5//2 => -3
This is what one would expect from floor division, but the text is a bit misleading in this case. From the text one would expect -2 here.
The text was updated successfully, but these errors were encountered:
In 04-Semantics-Operators.ipynb the // operator is described as
a // b | Floor division | Quotient of a and b, removing fractional parts
and
Floor division is true division with fractional parts truncated
Which works for the examples provided. However, in an active Jupyter notebook with negative numbers we see
-5/2 => -2.5
and
-5//2 => -3
This is what one would expect from floor division, but the text is a bit misleading in this case. From the text one would expect -2 here.
The text was updated successfully, but these errors were encountered: