title: Perform arithmetic operation in Jinja2
body: <p>I want to find the difference between two different values. But, I am getting a <code>Jinja2</code> error. I am not sure about how to find the difference in this template.</p>
  
  <p>I tried using <code>-</code> operator but this did not work. So, I used <code>sub</code> to find the difference between actual and predicted score.</p>
  
  <pre><code> {% for e in question.essays %}
      &lt;div class="panel panel-default"&gt;
          &lt;div class="panel-heading"&gt;
              &lt;h3 class="panel-title"&gt;{{loop.index}}&lt;/h3&gt;
          &lt;/div&gt;
          &lt;div class="panel-body"&gt;
              &lt;div class="actual-score"&gt;Actual score: {% if e.actual_score %} {{e.actual_score|round(1)}}/5{% endif %}&lt;/div&gt;
              &lt;div class="predicted-score"&gt;Predicted score: {% if e.predicted_score %}{{e.predicted_score|round(1)}}/5{% endif %}&lt;/div&gt;
              &lt;p class="essay-text"&gt;Text: {{e.text}}&lt;/p&gt;
          &lt;div class="diff"&gt;Difference: {{ e.actual_score|sub(e.predicted_score)}} &lt;/div&gt;
  
          &lt;/div&gt;
  </code></pre>
  
  <p>I am getting this error:</p>
  
  <pre><code>TemplateAssertionError: no filter named 'sub'
  </code></pre>