I was going through a coding competition. it asked there is decimal number and we have to find its modulo by 10^9 + 7(1000000007). the simple test cases were
- 1.23 should give output 110000002
- 4.0 should give output 4.
i was unable to understand how 1.23 can give that value. is decimal mod is treated in some different manner? not simply a remainder of a number.
There is a nice explanation about the data type sizes and their problems and also how to deal with modulo of exponential sizes.
https://www.hackerearth.com/practice/notes/abhinav92003/why-output-the-answer-modulo-109-7/