File:  [CENS] / python / pyGiNaC / test4 / test_Digits.py
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Mon Nov 26 22:37:44 2001 UTC (16 years ago) by pearu
Branches: MAIN
CVS tags: HEAD
See NEWS.txt (impl. matrix)

#!/usr/bin/env python
"""
  test_Digits - run ginac.Digits tests.
  Usage:
    python test_Digits.py [-v]
"""
"""
  This file is part of the PyGiNaC package.
  http://cens.ioc.ee/projects/pyginac/

  $Revision: 1.2 $
  $Id: test_Digits.py,v 1.2 2001-11-26 22:37:44 pearu Exp $
 
  Copyright 2001 Pearu Peterson all rights reserved,
  Pearu Peterson <pearu@cens.ioc.ee>
  Permission to use, modify, and distribute this software is given under the
  terms of the LGPL.  See http://www.fsf.org
 
  NO WARRANTY IS EXPRESSED OR IMPLIED.  USE AT YOUR OWN RISK.
"""

import test_all
import ginac

def test_Digits():
    """
    >>> Digits()
    17
    >>> Digits(25)
    17
    >>> Digits()
    25
    >>> Digits('default')
    25
    >>> Digits()
    17
    >>> Pi.evalf()
    numeric('3.1415926535897932385')
    >>> numeric(2)/3.
    numeric('0.6666666666666666667')
    >>> Digits(25)
    17
    >>> Pi.evalf()
    numeric('3.1415926535897932384626433833')
    >>> numeric(2)/3.
    numeric('0.66666666666666666666666666667')
    >>> Digits('default')
    25
    """

def _test():
    import test_Digits
    return test_all.test(test_Digits)

if __name__ == "__main__":
    _test()

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