# HG changeset patch
# User Michael Orlitzky <michael@orlitzky.com>
# Date 1376701384 14400
# Node ID 5c647669df26cac55fbbf4219a8bc2d36fedf302
# Parent 5683d7fca739649ee135a5b897383633444765a5
Trac #11934: Add a doctest to confirm that full_simplify() doesn't affect the imaginary part of an expression.
diff --git a/sage/symbolic/expression.pyx b/sage/symbolic/expression.pyx
a
|
b
|
|
7808 | 7808 | sage: f.simplify_full() |
7809 | 7809 | sqrt(x^2 + 2*x + 1) |
7810 | 7810 | |
| 7811 | The imaginary part of an expression should not change under |
| 7812 | simplification; :trac:`11934`:: |
| 7813 | |
| 7814 | sage: f = sqrt(-8*(4*sqrt(2) - 7)*x^4 + 16*(3*sqrt(2) - 5)*x^3) |
| 7815 | sage: original = f.imag_part() |
| 7816 | sage: simplified = f.full_simplify().imag_part() |
| 7817 | sage: original - simplified |
| 7818 | 0 |
| 7819 | |
7811 | 7820 | """ |
7812 | 7821 | x = self |
7813 | 7822 | x = x.simplify_factorial() |