Comment #26 on issue 93 by [email protected]: Square root denesting
http://code.google.com/p/sympy/issues/detail?id=93
`sqrtdenest` does not denest the following example (appearing with XFAIL in
test_sqrtdenest.py)
```
sqrtdenest(sqrt(16-2*sqrt(29)+2*sqrt(55-10*sqrt(29))))
qrt(-2*sqrt(29) + 2*sqrt(-10*sqrt(29) + 55) + 16)
```
The reason is that `expr.match(sqrt(a + b * sqrt(r)))` does not guarantee
that `sqrt(r)` contains the deepest sqrt
a, b, r = Wild('a'), Wild('b'), Wild('r')
expr = sqrt(-2*sqrt(29) + 2*sqrt(-10*sqrt(29) + 55) + 16)
expr.match(sqrt(a + b * sqrt(r)))
{r_: 29, b_: -2, a_: 2*sqrt(-10*sqrt(29) + 55) + 16}
I fixed this bug in https://github.com/sympy/sympy/pull/792
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.