• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why ${24/6} results in double value?  RSS feed

 
raj malhotra
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Why execution of ${24/6} results in 16.0 and not 16?
Does anybody know how this computation works?

Thanks,
Raj
 
Ankit Garg
Sheriff
Posts: 9609
36
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
24/6 = 16 ??? I thought the answer should be 4.0 :-)

Anyways, this is from the JSP spec
JSP.2.3.5.2 Binary operator - A {/,div} B wrote:
coerce both A and B to Double and apply operator
 
raj malhotra
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ankit

Actually i simplified my example from ${24/6*4} to ${24/6}.But forget to change the result.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!