Back to index

texmacs  1.0.7.15
Functions | Variables
math_util.hpp File Reference
#include "tree.hpp"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

double square (double x)
double norm (double x)
double nearest (double x)
int sign (double x)
bool fnull (double x, double approx)
double pow (double x, int n)

Variables

const double tm_infinity = 3.40282347e+38F
const double tm_PI = 3.1415926535897932384626433832795029L
const double tm_E = 2.7182818284590452353602874713526625L

Function Documentation

bool fnull ( double  x,
double  approx 
) [inline]

Definition at line 25 of file math_util.hpp.

{ return norm(x) <= approx; }

Here is the call graph for this function:

Here is the caller graph for this function:

double nearest ( double  x) [inline]

Definition at line 22 of file math_util.hpp.

                                 { // round missing in some math.h
  return floor (x+0.5); }

Here is the caller graph for this function:

double norm ( double  x) [inline]

Definition at line 21 of file math_util.hpp.

{ return x>0?x:-x; }
double pow ( double  x,
int  n 
) [inline]

Definition at line 27 of file math_util.hpp.

                                    {
  if (n<=0) return 1; n--; while (n--) x*=x; return x; }
int sign ( double  x) [inline]

Definition at line 24 of file math_util.hpp.

{ return x>0?1:x<0?-1:0; } 

Here is the caller graph for this function:

double square ( double  x) [inline]

Definition at line 20 of file math_util.hpp.

{ return x*x; }

Variable Documentation

const double tm_E = 2.7182818284590452353602874713526625L

Definition at line 18 of file math_util.hpp.

const double tm_infinity = 3.40282347e+38F

Definition at line 16 of file math_util.hpp.

const double tm_PI = 3.1415926535897932384626433832795029L

Definition at line 17 of file math_util.hpp.