Unexpected output in R with modulus operator

46 Views Asked by At
((10*(7655.7-7652.3))%/%(2))
[1] 16

((10*(655.7-652.3))%/%(2))
[1] 17

((10*(7655.7-7652.3))%/%(2))
[1] 16

((10*(8655.7-8652.3))%/%(2))
[1] 17

((10*(9655.7-9652.3))%/%(2))
[1] 17

((10*(7655.7-7652.3))%/%(2))
[1] 16

%/% operator gives the quotient so why is the result different when we replace the 9 in 9652.3 with 7 ?

0

There are 0 best solutions below