title: sympy - UnevaluatedExpr and commutative property - keep a float number unevaluated
body: <p>I have the following expression: <code>Bg = (pi / H)**2 + (2.405 / R)**2</code>. In my computations I would like to keep the float number <code>2.405</code> unevaluated, otherwise I end up with long floats numbers scattered all around my expressions.</p>
  
  <p>I thought I could use sympy <code>UnevaluatedExpr</code> to represent that float number. That worked nicely to further develop my expressions. The problem is that expressions containing <code>UnevaluatedExpr</code> are non-commutative, thus I cannot use methods like <code>solve()</code>, <code>factor()</code>, <code>collect()</code>, ... otherwise they throw errors complaining about the non-commutative nature of the expression.</p>
  
  <p>The following code shows that the expression is non-commutative because I used <code>UnevaluatedExpr</code>.</p>
  
  <pre><code>import sympy as sp
  R, H = sp.symbols("R, H", real=True, positive=True)
  
  Bg = (sp.pi / H)**2 + (sp.UnevaluatedExpr(2.405) / R)**2
  print(Bg)
  print(Bg.is_commutative)
  
  &gt;&gt;&gt; 2.405**2/R**2 + pi**2/H**2
  &gt;&gt;&gt; False
  </code></pre>
  
  <p>whereas the following code shows that the expression is commutative, though the float number was evaluated:</p>
  
  <pre><code>Bg = (sp.pi / H)**2 + (2.405 / R)**2
  print(Bg)
  print(Bg.is_commutative)
  
  &gt;&gt;&gt; 5.784025/R**2 + pi**2/H**2
  &gt;&gt;&gt; True
  </code></pre>
  
  <p>Questions:</p>
  
  <ol>
  <li>Can the <code>UnevaluatedExpr</code> and commutative behaviour be a bug?  </li>
  <li>What's the best way to deal with float number and prevent their evaluation? I thought about substituting the number with a symbol: that's fine for my simple example but if I work on bigger expressions it could quickly turn to a mess.</li>
  </ol>