Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit c2b45c0

Browse files
DaveWitteMorrisdimpase
authored andcommitted
doctest for trac 31137
1 parent 6161215 commit c2b45c0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/sage/symbolic/expression.pyx

+14
Original file line numberDiff line numberDiff line change
@@ -4146,6 +4146,20 @@ cdef class Expression(CommutativeRingElement):
41464146
4*pi^2
41474147
sage: exp(-3*ln(-9*x)/3)
41484148
-1/9/x
4149+
4150+
Check that :trac:`31137` is also fixed::
4151+
4152+
sage: _ = var('A, L, G, R, f, k, n, q, u, beta, gamma', domain="positive")
4153+
sage: a = I*R^2*f^3*k*q*A*u
4154+
sage: b = 2*pi*L*R^2*G*f^4*k^2*q - 2*pi*L*R^2*G*f^4*q - 2*pi*L*R^2*beta^2*G*q
4155+
sage: c = (2*I*pi*L*R^2*beta*gamma*q + 2*I*pi*L*R*(beta + q))*G*f^3
4156+
sage: d = 2*(pi*(beta^2 + 1)*L*R^2*q + pi*L*R*beta*gamma*q + pi*L*beta)*G*f^2
4157+
sage: e = (-2*I*pi*L*R^2*beta*gamma*q - 2*I*pi*(beta^2*q + beta)*L*R)*G*f
4158+
sage: expr = a / ((b + c + d + e)*n)
4159+
sage: R = ((sqrt(expr.real()^2 + expr.imag()^2).factor())^2).factor()
4160+
sage: Rs = R.subs(f = 2*beta)
4161+
sage: len(str(Rs))
4162+
520
41494163
"""
41504164
cdef Expression nexp = <Expression>other
41514165
cdef GEx x

0 commit comments

Comments
 (0)