eg_lpnum.h File Reference


Detailed Description

Definition in file eg_lpnum.h.

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include <math.h>
#include <float.h>
#include "eg_lpnum.dbl.h"
#include "eg_macros.h"
#include "eg_mem.h"

Include dependency graph for eg_lpnum.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Number Types Definitions:

Define (as its name suggest) an internal identifier for the given type. this definitions are provided to select different types of data at compile time, thus allowing us to provide limited template support.

#define DBL_TYPE   0
#define FLOAT128_TYPE   13
#define FLT_TYPE   1
#define FP10_TYPE   3
#define FP20_TYPE   4
#define FP25_TYPE   6
#define FP28_TYPE   5
#define INT_TYPE   2
#define LDBL_TYPE   11
#define LLINT_TYPE   12

Defines

#define __EGlpNumAllocArray(type, size)
 Allocate an array of a given type and store (sizeof(size_t) bytes before the actual array) the size of the allocated array.
#define __EGlpNumArraySize(array)
 Given an array allocated with __EGlpNumAllocArray, return the size of the given array, if the array is null, return zero.
#define __EGlpNumFreeArray(array)
 , given an array allocated by __EGlpNumAllocArray, free the allocated memory.
#define EGLPNUM_DEBUGL   100
 Debugging verbosity messages deped on the value of DEBUG (defined in eg_configure.h) and on the value of EGLPNUM_DEBUGL macro defined here.
#define EGLPNUM_MINEPS   0x1ep-20
 This constant define the of the acuracy required while converting doubles to rationals, a good number is 1e-5. More exactly, we stop the continued fraction method whenever the next e_i-[e_i] computed is less than EGLPNUM_MINEPS. Note that this value can't be smaller than 1/ULONG_MAX, otherwise we will have problems in the confertion step.
#define EGLPNUM_TYPE   DBL_TYPE
 default type for EGLPNUM_TYPE

Functions

void EGlpNumSetPrecision (const unsigned prec)
 Change the default precision for mpf_t numbers.


Generated on Wed Nov 21 09:38:19 2007 for MTgomory by  doxygen 1.4.6