• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in EL Division

 
Seenikkannan krishnasamy
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is EL division double based?

say for an example ${1+2/3} - 1.666666666665 (2/3 done first - Precedence)

How about EL multi*?

Please correct me if i am wrong

Thanks,
Seenikkannan.K
[ March 13, 2007: Message edited by: Seenikkannan krishnasamy ]
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic