Thanks for sharing this story. To be honest, working with float and double require a deep understanding of underlying programming language and this kind of mistakes is very common. Only a story like this and further research can avoid this, maybe static analysis tools like Fortify as well.
Btw, I have also shared some thoughts on this topic previously, just in case if anyone want to learn more how to deal with float and double in Java: