How can I check if a double x is evenly divisible by another double y in C? With integers I would just use modulo, but what would be the correct/best way to do it with doubl
The concept of "even number" is only defined for integers. You can't apply it to doubles; it does not make mathematical sense. From Wikipedia:
An even number is an integer that is "evenly divisible" by 2, i.e., divisible by 2 without remainder.
I suggest you convert your doubles to ints, by applying whatever method you decide (rounding, truncation) and then use modulo as you suggest.