We have a jsp-page which presents some double values, on some of the doubles there is also a multiplication by -1 made on the jsp. This works fine except for zero values which is presented as "-0" and choose of correct css class fails in the el statement.
Here's an example to show the problem:
<c:set var="positiveZero" value="${0.0}" />
<c:set var="negativeZero" value="${0.0 * -1}" />
<p>negativeZero: ${negativeZero}</p>
<p>less than 0? ${negativeZero < 0}</p>
<p>positiveZero: ${positiveZero}</p>
<p>less than 0? ${positiveZero < 0}</p>
The output of this is:
negativeZero: -0.0
less than 0? true
positiveZero: 0.0
less than 0? false
Do you have any suggestion how to make sure the values are presented as "positive zeros" and also make sure that the "less than 0" statement returns false in both cases?