title: Modulos function in freemarker truncating result
body: <p>I'm trying to make a "complex calculation" in a freemarker template. The calculation calls for a modulus call. At first I kept simplifying my code, and finally just hardcoding values to try and figure out the cause, but it seems that freemarker's mod function ALWAYS returns int values?? but they're not even rounded, they're truncated. I need them rounded (.5 up would work). My most simplified code that does NOT work is this: 
  <code>&lt;#assign p_year_m1 = (2503.638 % 7.00)?float&gt;</code></p>
  
  <p>the longer version is:
  <code>&lt;#assign p_year_m1 = ((bdy_m1 + (bdy_m1/4.0)-(bdy_m1/100.0)+(bdy_m1/400.0)))%7&gt;</code></p>
  
  <p>So the correct answer should be 4.638, rounds up to 5, but I'm getting 4.00 even if I wrap <code>?string[0.00]</code> around it.</p>
  
  <p>What am I missing? Surely there has to be a way to make this work! If not, I guess I'd need help constructing a work around to get similar results.</p>
  
  <p>Thanks.</p>
  
  <p>PS - the var, p_year_m1 is not intialized before this, so I believe if I try to store a float in there it should hold a float.</p>
  
  <p><a href="https://en.wikipedia.org/wiki/ISO_week_date#Weeks_per_year" rel="nofollow">This is the calculation I'm trying to replicate</a></p>