File:  [CENS] / python / pyGiNaC / test / numeric.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: numeric.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(numeric(3,4),basic)	:: 1
isinstance(numeric(3,4),numeric):: 1
isinstance(numeric(3,4),ex)	:: 0
isinstance(numeric("3.4"),numeric):: 1
isinstance(numeric("3"),numeric):: 1

numeric("3").print_(0)		:: 3
numeric("3.4").print_(0)	:: 3.4
numeric("3.4444444444444444444444444444444444").print_(0) :: 3.4444444444444444445
numeric("3.123456789012345678901234567890E-23").print_(0) :: 3.123456789012345679E-23
numeric("3").printraw()		:: numeric(3)
numeric("-3.4").printraw()		:: numeric(-3.4L0)
numeric("3").printcsrc(0,0) :: 3.000000e+00
numeric("3.7").printcsrc(0,0) :: 3.700000e+00
numeric("3.123456789012").printcsrc(1,0) :: 3.123457e+00
numeric("3.123456789012").printcsrc(2,0) :: cln::cl_F("3.123456789012")
numeric("3.12345678901234567890123456").printcsrc(2,0) :: cln::cl_F("3.1234567890123456789")

numeric(3,4).print_(0) :: 3/4
numeric(3.7).print_(0)[:14] :: 3.700000000000

numeric(3,4) :: 3/4

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