<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div><br>
</div>
<div>Dear Vladimir V. Kisil,</div>
<div><br>
</div>
<div>Thanks very much for suggestion to use expand() method on e3 first.</div>
<div><br>
</div>
<div>And I have given a look at the source code at power::to_polynomial</div>
<div><br>
</div>
<div><a href="https://www.ginac.de/reference/normal_8cpp_source.html#l02688" id="LPNoLPOWALinkPreview">https://www.ginac.de/reference/normal_8cpp_source.html#l02688</a></div>
<div class="_Entity _EType_OWALinkPreview _EId_OWALinkPreview _EReadonly_1"></div>
<br>
<div><br>
</div>
<div> 2688  ex power::to_polynomial(exmap & repl) const</div>
<div> 2689 {</div>
<div> 2690     if (exponent.info(info_flags::posint))</div>
<div> 2691         return pow(basis.to_rational(repl), exponent);</div>
<div> 2692     else if (exponent.info(info_flags::negint))</div>
<div> 2693     {</div>
<div> 2694         ex basis_pref = collect_common_factors(basis);</div>
<div> 2695         if (is_exactly_a<mul>(basis_pref) || is_exactly_a<power>(basis_pref)) {</div>
<div> 2696             // (A*B)^n will be automagically transformed to A^n*B^n</div>
<div> 2697             ex t = pow(basis_pref, exponent);</div>
<div> 2698             return t.to_polynomial(repl);</div>
<div> 2699         }</div>
<div> 2700         else</div>
<div> 2701             return pow(replace_with_symbol(pow(basis, _ex_1), repl), -exponent);</div>
<div> 2702     } </div>
<div> 2703     else</div>
<div> 2704         return replace_with_symbol(*this, repl);</div>
<div> 2705 }</div>
<div><br>
</div>
<div>and I wonfer if there is a typo on line <span style="caret-color:rgb(0, 0, 0);background-color:rgb(255, 255, 255);display:inline !important">2691, the <span style="caret-color:rgb(0, 0, 0);background-color:rgb(255, 255, 255);display:inline !important">basis.to_rational
 can be replaced with <span style="caret-color:rgb(0, 0, 0);background-color:rgb(255, 255, 255);display:inline !important">basis.to_polynomial?</span></span></span></div>
<div><br>
</div>
<div>Best regards!</div>
Feng<br>
</div>
</body>
</html>