File:  [CENS] / python / pyGiNaC / test / mul.tst
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Tue Mar 13 06:39:47 2001 UTC (16 years, 8 months ago) by pearu
Branches: MAIN
CVS tags: HEAD
Separated tests

#
# $Id: mul.tst,v 1.1 2001-03-13 06:39:47 pearu Exp $
# Pearu Peterson

_startup = __import__('__startup__')
module = __import__('GiNaC._ginac',globals(),locals(),['_ginac'])

isinstance(mul(ex(),ex()),mul) :: 1
isinstance(mul(ex(),ex()),expairseq) :: 1
isinstance(mul(ex(),ex()),basic) :: 1
isinstance(mul(ex(),ex()),ex) :: 0

mul(ex(),ex()).print_(0) :: 0*
mul(ex(),ex(numeric("3"))).print_(0) :: 0*
mul(ex(numeric("2")),ex(numeric("3"))).print_(0) :: 6*
mul(ex(symbol("a")),ex(numeric("3"))).print_(0) :: 3*a
mul(ex(symbol("a")),ex(numeric("3")),ex()).print_(0) :: 0*a
mul(ex(symbol("a")),ex(numeric("3")),ex(symbol("b"))).print_(0) :: 3*a*b

mul(ex(),ex()).printraw().split('=')[0] :: *(,hash#=1,flags=0)
mul(ex(symbol("a")),ex(numeric("5"))).printraw().split(',')[0] :: *((symbol(name=a#,serial=31,hash=1075823000,flags=7),numeric(1)),,hash=1,flags=0)
mul(ex(symbol("a")),ex(numeric("5"))).print_(0) :: 5*a
mul(ex(symbol("a")),ex(numeric("5"))).printtree(0).split('hash')[0] :: type=mul,#hash=0(0x0),flags=0,nops=2\na(symbol):serial=33,hash=1344966046(0x502a8d9e),flags=7\n1(numeric):hash=2147483713(0x80000041),flags=15\n-----\noverall_coeff\n5(numeric):hash=2147483731(0x80000053),flags=15\n=====\n
mul(ex(symbol("a")),ex(numeric("5"))).printcsrc(0,0) :: 5.000000e+00*a
mul(ex(symbol("a")),ex(numeric("5"))).printcsrc(1,0) :: 5.000000e+00*a
mul(ex(symbol("a")),ex(numeric("5"))).printcsrc(2,0) :: cln::cl_F("5.0")*a

mul(exvector((ex(3),ex(symbol("a"))))).print_(0) :: 3*a

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>