# HG changeset patch
# User Burcin Erocal <burcin@erocal.org>
# Date 1270200415 7200
# Node ID 86470714b52ad2779bb0188e8d723164c1068382
# Parent db7143738e1dbcb0c5415884ebaeee4500da1520
trac 8565: add doctests for fixes in GiNaC/pynac that allows correctly deducing negativity of mul objects. This also fixes the "divide by zero" error raised by evaluating atan2(pi,0).
diff git a/sage/functions/trig.py b/sage/functions/trig.py
a

b


536  536  sage: x,y = var('x,y') 
537  537  sage: arctan2(y,x).operator() 
538  538  arctan2 
 539  
 540  Check if #8565 is fixed:: 
 541  
 542  sage: atan2(pi,0) 
 543  1/2*pi 
539  544  """ 
540  545  GinacFunction.__init__(self, "arctan2", nargs=2, latex_name=r'\arctan', 
541  546  conversions=dict(maxima='atan2')) 
diff git a/sage/symbolic/expression.pyx b/sage/symbolic/expression.pyx
a

b


1276  1276  sage: SR(5)._is_negative() 
1277  1277  True 
1278  1278  
1279   We can't deduce much for _is_negative():: 
 1279  Check if we can correctly deduce negativity of mul objects:: 
1280  1280  
1281  1281  sage: t0 = SR.symbol("t0", domain='positive') 
1282  1282  sage: t0._is_negative() 
1283  1283  False 
1284  1284  sage: (t0)._is_negative() 
1285   False 
 1285  True 
 1286  sage: (pi)._is_negative() 
 1287  True 
1286  1288  """ 
1287  1289  return self._gobj.info(info_negative) 
1288  1290  