Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
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: 9579
33
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