Why 2.4 mod 0.8 returns 0.8

Viewed 277

Why modulus calculation of 2.4 by 0.8 returns 0.8? Shouldn't it return 0?

It happens both in PHP, via fmod, and JavaScript, via %.

Even a google research with this operation fails: http://www.google.com/search?q=2.4+mod+0.8

2 Answers
Related