Hacker News new | ask | show | jobs
by awwright 1234 days ago
The behavior is perfectly well defined... there's no special cases for integers vs. rational numbers, they're all the same.

For example, given multipleOf: 0.3, and an input of 0.9, 0.9/0.3 is 3, which is an integer, so would be accepted. A value of 0.8 would be rejected.

1 comments

0.3 is not the same thing as 3/10 in ieee754, neither is 0.1 the same as 1/10.