title: Helm template float arithmetic
body: <pre><code>$ helm version
  version.BuildInfo{Version:&quot;v3.3.0&quot;, GitCommit:&quot;8a4aeec08d67a7b84472007529e8097ec3742105&quot;, GitTreeState:&quot;dirty&quot;, GoVersion:&quot;go1.14.6&quot;}
  </code></pre>
  <p>So I have my template:</p>
  <pre class="lang-yaml prettyprint-override"><code>  minAvailable: {{ mul .Values.autoscaling.minReplicas 0.75 }}
  </code></pre>
  <p>values.yaml:</p>
  <pre class="lang-yaml prettyprint-override"><code>autoscaling:
    minReplicas: 3
  </code></pre>
  <p>I would have expected a rendered output of <code>2.25</code>, but I get 0 (<code>3 * 0</code> because <code>0.75</code> gets floored...)</p>
  <p>I've tried things like</p>
  <pre class="lang-yaml prettyprint-override"><code>  minAvailable: {{ mul (float .Values.autoscaling.minReplicas) 0.75 }}
  </code></pre>
  <p>Ultimately I'm going to <code>floor</code> the value to get back to an int...</p>
  <pre class="lang-yaml prettyprint-override"><code>  minAvailable: {{ floor ( mul .Values.autoscaling.minReplicas 0.75 ) }}
  </code></pre>
  <p>But I just don't understand why I can't seem to do simple float arithmetic</p>
  <hr />
  <p>Other things I've tried</p>
  <pre class="lang-yaml prettyprint-override"><code>  minAvailable: {{ float64 .Values.autoscaling.minReplicas }} 
  </code></pre>
  <pre class="lang-yaml prettyprint-override"><code>  minAvailable: {{ float64 .Values.autoscaling.minReplicas | toString }} 
  </code></pre>
  <p>nothing produces a float number....</p>
  <p>I've even tried doing this in values.yaml</p>
  <pre><code>autoscaling:
    minReplicas: 3.0
  </code></pre>