GiNaC 1.8.7
Classes | Namespaces | Functions | Variables
numeric.cpp File Reference

This file contains the interface to the underlying bignum package. More...

#include "numeric.h"
#include "ex.h"
#include "operators.h"
#include "archive.h"
#include "utils.h"
#include <limits>
#include <sstream>
#include <stdexcept>
#include <string>
#include <vector>
#include <cln/output.h>
#include <cln/integer_io.h>
#include <cln/integer_ring.h>
#include <cln/rational_io.h>
#include <cln/rational_ring.h>
#include <cln/lfloat_class.h>
#include <cln/lfloat_io.h>
#include <cln/real_io.h>
#include <cln/real_ring.h>
#include <cln/complex_io.h>
#include <cln/complex_ring.h>
#include <cln/numtheory.h>

Go to the source code of this file.

Classes

class  GiNaC::lanczos_coeffs
 

Namespaces

namespace  GiNaC
 

Functions

 GiNaC::GINAC_IMPLEMENT_REGISTERED_CLASS_OPT (numeric, basic, print_func< print_context >(&numeric::do_print). print_func< print_latex >(&numeric::do_print_latex). print_func< print_csrc >(&numeric::do_print_csrc). print_func< print_csrc_cl_N >(&numeric::do_print_csrc_cl_N). print_func< print_tree >(&numeric::do_print_tree). print_func< print_python_repr >(&numeric::do_print_python_repr)) numeric
 default ctor. More...
 
static const cln::cl_F GiNaC::make_real_float (const cln::cl_idecoded_float &dec)
 Construct a floating point number from sign, mantissa, and exponent. More...
 
static const cln::cl_F GiNaC::read_real_float (std::istream &s)
 Read serialized floating point number. More...
 
 GiNaC::GINAC_BIND_UNARCHIVER (numeric)
 
static void GiNaC::write_real_float (std::ostream &s, const cln::cl_R &n)
 
static void GiNaC::print_real_number (const print_context &c, const cln::cl_R &x)
 Helper function to print a real number in a nicer way than is CLN's default. More...
 
static void GiNaC::print_integer_csrc (const print_context &c, const cln::cl_I &x)
 Helper function to print integer number in C++ source format. More...
 
static void GiNaC::print_real_csrc (const print_context &c, const cln::cl_R &x)
 Helper function to print real number in C++ source format. More...
 
template<typename T1 , typename T2 >
static bool GiNaC::coerce (T1 &dst, const T2 &arg)
 
template<>
bool GiNaC::coerce< int, cln::cl_I > (int &dst, const cln::cl_I &arg)
 Check if CLN integer can be converted into int. More...
 
template<>
bool GiNaC::coerce< unsigned int, cln::cl_I > (unsigned int &dst, const cln::cl_I &arg)
 
static void GiNaC::print_real_cl_N (const print_context &c, const cln::cl_R &x)
 Helper function to print real number in C++ source format using cl_N types. More...
 
const numeric GiNaC::exp (const numeric &x)
 Exponential function. More...
 
const numeric GiNaC::log (const numeric &x)
 Natural logarithm. More...
 
const numeric GiNaC::sin (const numeric &x)
 Numeric sine (trigonometric function). More...
 
const numeric GiNaC::cos (const numeric &x)
 Numeric cosine (trigonometric function). More...
 
const numeric GiNaC::tan (const numeric &x)
 Numeric tangent (trigonometric function). More...
 
const numeric GiNaC::asin (const numeric &x)
 Numeric inverse sine (trigonometric function). More...
 
const numeric GiNaC::acos (const numeric &x)
 Numeric inverse cosine (trigonometric function). More...
 
const numeric GiNaC::atan (const numeric &x)
 Numeric arcustangent. More...
 
const numeric GiNaC::atan (const numeric &y, const numeric &x)
 Numeric arcustangent of two arguments, analytically continued in a suitable way. More...
 
const numeric GiNaC::sinh (const numeric &x)
 Numeric hyperbolic sine (trigonometric function). More...
 
const numeric GiNaC::cosh (const numeric &x)
 Numeric hyperbolic cosine (trigonometric function). More...
 
const numeric GiNaC::tanh (const numeric &x)
 Numeric hyperbolic tangent (trigonometric function). More...
 
const numeric GiNaC::asinh (const numeric &x)
 Numeric inverse hyperbolic sine (trigonometric function). More...
 
const numeric GiNaC::acosh (const numeric &x)
 Numeric inverse hyperbolic cosine (trigonometric function). More...
 
const numeric GiNaC::atanh (const numeric &x)
 Numeric inverse hyperbolic tangent (trigonometric function). More...
 
static cln::cl_N GiNaC::Li2_series (const cln::cl_N &x, const cln::float_format_t &prec)
 Numeric evaluation of Dilogarithm within circle of convergence (unit circle) using a power series. More...
 
static cln::cl_N GiNaC::Li2_projection (const cln::cl_N &x, const cln::float_format_t &prec)
 Folds Li2's argument inside a small rectangle to enhance convergence. More...
 
const cln::cl_N GiNaC::Li2_ (const cln::cl_N &value)
 Numeric evaluation of Dilogarithm. More...
 
const numeric GiNaC::Li2 (const numeric &x)
 
const numeric GiNaC::zeta (const numeric &x)
 Numeric evaluation of Riemann's Zeta function. More...
 
static cln::float_format_t GiNaC::guess_precision (const cln::cl_N &x)
 
const cln::cl_N GiNaC::lgamma (const cln::cl_N &x)
 The Gamma function. More...
 
const numeric GiNaC::lgamma (const numeric &x)
 
const cln::cl_N GiNaC::tgamma (const cln::cl_N &x)
 
const numeric GiNaC::tgamma (const numeric &x)
 
const numeric GiNaC::psi (const numeric &x)
 The psi function (aka polygamma function). More...
 
const numeric GiNaC::psi (const numeric &n, const numeric &x)
 The psi functions (aka polygamma functions). More...
 
const numeric GiNaC::factorial (const numeric &n)
 Factorial combinatorial function. More...
 
const numeric GiNaC::doublefactorial (const numeric &n)
 The double factorial combinatorial function. More...
 
const numeric GiNaC::binomial (const numeric &n, const numeric &k)
 The Binomial coefficients. More...
 
const numeric GiNaC::bernoulli (const numeric &nn)
 Bernoulli number. More...
 
const numeric GiNaC::fibonacci (const numeric &n)
 Fibonacci number. More...
 
const numeric GiNaC::abs (const numeric &x)
 Absolute value. More...
 
const numeric GiNaC::mod (const numeric &a, const numeric &b)
 Modulus (in positive representation). More...
 
const numeric GiNaC::smod (const numeric &a_, const numeric &b_)
 Modulus (in symmetric representation). More...
 
const numeric GiNaC::irem (const numeric &a, const numeric &b)
 Numeric integer remainder. More...
 
const numeric GiNaC::irem (const numeric &a, const numeric &b, numeric &q)
 Numeric integer remainder. More...
 
const numeric GiNaC::iquo (const numeric &a, const numeric &b)
 Numeric integer quotient. More...
 
const numeric GiNaC::iquo (const numeric &a, const numeric &b, numeric &r)
 Numeric integer quotient. More...
 
const numeric GiNaC::gcd (const numeric &a, const numeric &b)
 Greatest Common Divisor. More...
 
const numeric GiNaC::lcm (const numeric &a, const numeric &b)
 Least Common Multiple. More...
 
const numeric GiNaC::sqrt (const numeric &x)
 Numeric square root. More...
 
const numeric GiNaC::isqrt (const numeric &x)
 Integer numeric square root. More...
 
ex GiNaC::PiEvalf ()
 Floating point evaluation of Archimedes' constant Pi. More...
 
ex GiNaC::EulerEvalf ()
 Floating point evaluation of Euler's constant gamma. More...
 
ex GiNaC::CatalanEvalf ()
 Floating point evaluation of Catalan's constant. More...
 
std::ostream & GiNaC::operator<< (std::ostream &os, const _numeric_digits &e)
 

Variables

const numeric GiNaC::I = numeric(cln::complex(cln::cl_I(0),cln::cl_I(1)))
 Imaginary unit. More...
 
_numeric_digits GiNaC::Digits
 Accuracy in decimal digits. More...
 

Detailed Description

This file contains the interface to the underlying bignum package.

Its most important design principle is to completely hide the inner working of that other package from the user of GiNaC. It must either provide implementation of arithmetic operators and numerical evaluation of special functions or implement the interface to the bignum package.

Definition in file numeric.cpp.


This page is part of the GiNaC developer's reference. It was generated automatically by doxygen. For an introduction, see the tutorial.