Question

Why is it that

    -4.5 mod 2.3
0.1

Going by the definition in Q4Mortals:

For a positive divisor, the remainder is defined as the difference between the dividend and the largest integral multiple of the divisor not exceeding the absolute value of the dividend.

2.3 is the lagest integral multiple not exceeding abs -4.5. Taking the difference, -4.5 - 2.3 = -6.8

If this definition is wrong (which it seems to be), then what is the correct one?

Était-ce utile?

La solution

think it should be just

For a positive divisor, the remainder is defined as the difference between the dividend and the largest integral multiple of the divisor not exceeding the dividend.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top