Some ideas - Multiply by a power of ten 10 (if you know exactly how many decimal places and do what ever you want to do in integer arithmetic. - Transform it to string and compare the part you want