Some BigDecimal fail to calculate with ** operator
<p>When I use <code>**</code> operator with negative <code>BigDecimal</code> and decimal <code>BigDecimal</code>, that fails with <code>Zero or negative argument</code> error.</p>

<p>I checked some similar values like this:</p>

<pre><code>-2 ** '0.3'.to_d
# =&gt; -1.23114441
2 ** '0.3'.to_d
# =&gt; 1.23114441
2 ** '0.3'.to_d
# =&gt; 1.23114441
-2 ** '0.3'.to_d
# =&gt; -1.23114441
2.to_d ** '0.3'.to_d
# =&gt; 1.23114441
-2.to_d ** '0.3'.to_d
# =&gt; Math::DomainError: Zero or negative argument for log
from (pry):111:in `**'
2.to_d ** 3.to_d
# =&gt; 8.0
-2.to_d ** 3.to_d
# =&gt; -8.0
</code></pre>

<p>Why is this error happens and how can I fix it?</p>