# HG changeset patch
# User Burcin Erocal <burcin@erocal.org>
# Date 1241564869 7200
# Node ID 14f93946187a509754ba12be3124d64df69b4b2e
# Parent 012d71daae6bd233cc39a5c0ab69ddba6ec294b0
Add doctests to test that
 the exp function in pynac doesn't print the exponent if it is equal to 1.
 powers of the exp function are handled properly, i.e. (e^x)^y > e^(x*y)
diff git a/sage/symbolic/expression.pyx b/sage/symbolic/expression.pyx
a

b


261  261  I 
262  262  sage: y + 3*(x^(1)) 
263  263  y + 3/x 
 264  
 265  Printing the exp function:: 
 266  
 267  sage: x.parent(1).exp() 
 268  e 
 269  sage: x.exp() 
 270  e^x 
264  271  """ 
265  272  return GEx_to_str(&self._gobj) 
266  273  
… 
… 

1321  1328  Infinity 
1322  1329  sage: S(unsigned_infinity)^2 
1323  1330  Infinity 
 1331  
 1332  Test powers of exp:: 
 1333  
 1334  sage: S(2).exp()^5 
 1335  e^10 
 1336  sage: x.exp()^5 
 1337  e^(5*x) 
1324  1338  """ 
1325  1339  cdef Expression nexp = self.coerce_in(exp) 
1326  1340  cdef GEx x 