title: How to set the decimal to 2 in MariaDB
body: <p>I use Laravel with vue/vuetify in frontend.</p>
  <p>In a simple form, the user can set the <code>settlement_factor</code>which is a number with 2 decimals.</p>
  <p>The field in the DB looks like</p>
  <p><a href="https://i.stack.imgur.com/TVL5i.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TVL5i.png" alt="enter image description here" /></a></p>
  <p>If I enter 1.68 the entry in the db is 1.68 but the system returns 1.68000000000002</p>
  <p>Patch request value:</p>
  <pre><code>    &quot;settlement_factor&quot;: &quot;1.68&quot;,
  </code></pre>
  <p>Response value</p>
  <pre><code>    &quot;settlement_factor&quot;: 1.6800000000000002,
  </code></pre>
  <p>But if I enter 1.67, the system returns 1.67 which is right:</p>
  <p>Patch request value:</p>
  <pre><code>    &quot;settlement_factor&quot;: &quot;1.67&quot;,
  </code></pre>
  <p>Response value</p>
  <pre><code>    &quot;settlement_factor&quot;: 1.67,
  </code></pre>
  <p>I use Laravel ressources to modify the response:</p>
  <pre><code>            'settlement_factor'         =&gt;      $this-&gt;settlement_factor,
  </code></pre>
  <p>Why does the system change the value 1.68 to 1.68000000000002 but the other numbers are ok?</p>
  <p>I have no Idea to find the error.</p>
  <p>For a quick fix, I can add the <code>round()</code>function.</p>