title: Why does the Num typeclass have an abs method?
body: <p>I’m thinking about standard libraries (or preludes) for functional languages.</p>
  
  <p>If I have <code>Ord</code> instance for <code>n</code>, then it is trivial to implement <code>abs</code>:</p>
  
  <pre><code>abs n = if n &gt; 0 then n else (-n)
  </code></pre>
  
  <p>In the case of vector spaces, the absolute value (length) of a vector is very important. But the type doesn’t match because the absolute value of a vector is not a vector: it is a real number.</p>
  
  <p>What was the design rationale behind having <code>abs</code> (or <code>signum</code>) as part of the <code>Num</code> typeclass?</p>