title: C++ vector subtract elements
body: <p>I have a vector like this:</p>
  
  <pre><code>std::vector&lt;float&gt; v {5120.2, 5140.2, 5500.2, 5482.0, 5802.2};
  </code></pre>
  
  <p>I want to subtract all elements:</p>
  
  <pre><code>5120.2 - 5140.2 = -20.0
  5120.2 - 5500.2 = -380.0
  5120.2 - 5482.0 = -358.2
  5120.2 - 5802.2 = -682.0
  5140.2 - 5500.2 = -360.0
  5140.2 - 5482.0 = -341.8
  5140.2 - 5802.2 = -562.0
  5500.2 - 5482.0 =   18.0
  5500.2 - 5802.0 = -301.8
  5482.0 - 5802.0 = -320.0
  </code></pre>
  
  <p>I need only absolute values.</p>
  
  <p>How can I solve this with <code>std::transform</code>?Or any other way,more simpler the better.</p>