I think you need to rethink what you need to do. Doubles and floats are NEVEr 100% precise. It's just the nature of how numbers are stored in computers (this has nothing to do with
java).
Also, you realize that calling intValue "returns the value of the specified number as an int" - which means it is going to round it off to an integer?
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors