File:  [CENS] / python / pyGiNaC / wrappers4 / cln_py.hpp
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Wed Aug 15 08:32:18 2001 UTC (16 years, 3 months ago) by pearu
Branches: MAIN
CVS tags: HEAD
produced tests for numeric

/*
# This file is part of the PyGiNaC package.
# http://cens.ioc.ee/projects/pyginac/
#
# $Revision: 1.2 $
# $Id: cln_py.hpp,v 1.2 2001-08-15 08:32:18 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.
#
*/

#if 0
#include <cln/complex.h>
#include <cln/real.h>
#include <cln/integer.h>
#else
// Define cln objects explicitly to reduce memory usage during the compilation
// (effect is about 16MB with optimization flag on)
#include <iostream>
#include <cln/intparam.h>
#include <cln/integer_class.h>
namespace cln {
  extern const cl_N complex (const cl_R& a, const cl_R& b);
  extern sint32 cl_I_to_L (const cl_I& obj);
#if (long_bitsize==32)
  inline long          cl_I_to_long  (const cl_I& x) { return cl_I_to_L(x);  }
#elif (long_bitsize==64)
  inline long          cl_I_to_long  (const cl_I& x) { return cl_I_to_Q(x);  }
#endif
  extern const cl_I truncate1 (const cl_R& x);
  class cl_print_flags;
  extern void print_complex (std::ostream& stream, const cl_print_flags& flags, const cl_N& z);
  inline void fprint (std::ostream& stream, const cl_N& x)
  {
    extern cl_print_flags default_print_flags;
    print_complex(stream,default_print_flags,x);
  }
  inline std::ostream& operator<< (std::ostream& stream, const cl_N& x)
  {
    fprint(stream,x);
    return stream;
  }
  extern const cl_I operator- (const cl_I& x);
  extern const cl_I ash (const cl_I& x, const cl_I& y);
}
#endif

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