When dividing by 1000 I sometime run across a bug that doesn't do the division "correctly". For example, when dividing 90.55 by 1000 instead of getting .09055 I get .090549999999.
<c:out value="${bean.paPrice / 1000}" />
Why is this happening? Is this a result of floating point math? A google search seemed to indicate that this may be a culprit, but I have found no concrete answer.
To fix this I can round the answer to 5 digits, but it seems like this is just a patch to a deeper problem.
<fmt:formatNumber type="number" maxFractionDigits="5" value="${bean.paPrice / 1000}" />