# Doubt in EL Division

Seenikkannan krishnasamy

Greenhorn

Posts: 15

posted 9 years ago

JSP.2.3.5.2 Binary operator - A {/,div} B

� If A and B are null, return (Long) 0

� If A or B is a BigDecimal or a BigInteger, coerce both to BigDecimal and return A.divide( B, BigDecimal.ROUND_HALF_UP ).

� Otherwise, coerce both A and B to Double and apply operator

� If operator results in exception, error

For multiplication, refer to JSP.2.3.5.1 in the specification.

Is EL division double based?

JSP.2.3.5.2 Binary operator - A {/,div} B

� If A and B are null, return (Long) 0

� If A or B is a BigDecimal or a BigInteger, coerce both to BigDecimal and return A.divide( B, BigDecimal.ROUND_HALF_UP ).

� Otherwise, coerce both A and B to Double and apply operator

� If operator results in exception, error

For multiplication, refer to JSP.2.3.5.1 in the specification.

[My Blog]
*All roads lead to JavaRanch*