DRAFT
IntegerDivisionToRational
Misconception:
An expression like 1/2
will evaluate to 0.5
.
Incorrect
Dividing two integers can produce a rational number
Correct
CorrectionHere is what's right.
Here is what's right.
No. The /
in 1/2
is a division operator on two int
values. This performs an integer division. The result is 0
(the floor of 1/2). The same applies to 9/10
: it also is rounded down to 0
.
Language
Java