Bug report: codegen[optimize] generates an unknown "pow" function

November 04 2012 slizovskiy 25
Maple 16

0

The version 16 of Maple does not know the function "pow", it is replaced by "power". Nevertheless, the codegen[optimize] procedure still generates it!  Moreower, it's not optimal even to write poser(..., 1/2)  as, most probably, the function sqrt must run faster. 

  Here's an example: (the function being optimized just contains some nested square roots)

> iang10 := [codegen[optimize](Re(int11), tryhard)];
[ 2 t17
[t17 = q , t14 = ---, t24 = t17 vF1, t11 = -t24 + t14,
[ m1

2
t13 = -2 I omega, t25 = vF1 t17,

/ 1\
t20 = pow|4 t25 - 4 (t13 + t24) t11, -|,
\ 2/

t21 = 2 (q + t17) vF1 - 2 t14, t22 = vF1 q t20,

/ 1\
t23 = 2 t11 (t13 + t14) - 4 t25, t19 = pow|-2 t22 + t23, -|,
\ 2/

1 / 1\
t3 = ---, t27 = (t20 + t21) t3, t18 = pow|2 t22 + t23, -|,
t19 \ 2/

1 (1/2) / 1
t2 = ---, t26 = (-t20 + t21) t2, t1 = 4 2 Re|--- (q t11
t18 \t20

\]
(t19 (ln(t26) - ln(-t26)) + (ln(-t27) - ln(t27)) t18) t3 t2)|]
/]

 

Please Wait...