File:  [CENS] / python / pyGiNaC / wrappers3 / cln_py.hpp
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Sat Apr 21 15:46:36 2001 UTC (16 years, 7 months ago) by pearu
Branches: MAIN
CVS tags: HEAD
3rd way: Impl. ex methods, tests.

/*
# This file is part of the PyGiNaC package.
# http://cens.ioc.ee/projects/pyginac/
#
# $Revision: 1.1 $
# $Id: cln_py.hpp,v 1.1 2001-04-21 15:46:36 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;
}
}
#endif

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