MoSync 3.3
madmath.h File Reference

Intrinsic double-precision math. More...

#include "ma.h"
#include "mastring.h"

Defines

#define M_E   2.7182818284590452354
#define M_LOG2E   1.4426950408889634074
#define M_LOG10E   0.43429448190325182765
#define M_LN2   0.69314718055994530942
#define M_LN10   2.30258509299404568402
#define M_PI   3.14159265358979323846
#define M_PI_2   1.57079632679489661923
#define M_PI_4   0.78539816339744830962
#define M_1_PI   0.31830988618379067154
#define M_2_PI   0.63661977236758134308
#define M_2_SQRTPI   1.12837916709551257390
#define M_SQRT2   1.41421356237309504880
#define M_SQRT1_2   0.70710678118654752440
#define M_PI_D180   ((double)((double) 3.14159265358979323846 / (double) 180))
#define DBL_MANT_DIG   53
#define DBL_DIG   15
#define DBL_EPSILON   2.2204460492503131e-16
#define DBL_MIN_EXP   (-1021)
#define DBL_MIN   2.2250738585072014e-308
#define DBL_MIN_10_EXP   (-307)
#define DBL_MAX_EXP   1024
#define DBL_MAX   1.7976931348623157e+308
#define DBL_MAX_10_EXP   308

Functions

double modf (double x, double *intptr)
double fmod (double numerator, double denominator)
double fabs (double d)
double atof (const char *string)
double acos (double x)
double asin (double x)
double atan2 (double y, double x)
double log (double x)
double pow (double x, double y)
double atan (double x)
double ceil (double x)
double floor (double x)
double frexp (double x, int *eptr)
int isnan (double x)
int isinf (double x)

Detailed Description

Intrinsic double-precision math.

Author:
Antony Hartley

Define Documentation

#define M_E   2.7182818284590452354
#define M_LOG2E   1.4426950408889634074
#define M_LOG10E   0.43429448190325182765
#define M_LN2   0.69314718055994530942
#define M_LN10   2.30258509299404568402
#define M_PI   3.14159265358979323846
#define M_PI_2   1.57079632679489661923
#define M_PI_4   0.78539816339744830962
#define M_1_PI   0.31830988618379067154
#define M_2_PI   0.63661977236758134308
#define M_2_SQRTPI   1.12837916709551257390
#define M_SQRT2   1.41421356237309504880
#define M_SQRT1_2   0.70710678118654752440
#define M_PI_D180   ((double)((double) 3.14159265358979323846 / (double) 180))
#define DBL_MANT_DIG   53
#define DBL_DIG   15
#define DBL_EPSILON   2.2204460492503131e-16
#define DBL_MIN_EXP   (-1021)
#define DBL_MIN   2.2250738585072014e-308
#define DBL_MIN_10_EXP   (-307)
#define DBL_MAX_EXP   1024
#define DBL_MAX   1.7976931348623157e+308
#define DBL_MAX_10_EXP   308

Function Documentation

double modf ( double  x,
double *  intptr 
)

Breaks x into two parts: the integer part (stored in the object pointed by intpart) and the fractional part (returned by the function). Each part has the same sign as x.

double fmod ( double  numerator,
double  denominator 
)

Returns the floating point remainder of the division (numerator / denominator).

double fabs ( double  d)

Returns the absolute value of x.

double atof ( const char *  string)

Parses the null-terminated string, interpreting its content as a floating point number and returns its value as a double.

double acos ( double  x)

Returns the arc cosine of x.

double asin ( double  x)

Returns the arc sine of x.

double atan2 ( double  y,
double  x 
)

Returns the angle of bidimensional vector (x, y), expressed in radians, in the range -PI to PI.

double log ( double  x)

Returns the natural logarithm of x.

double pow ( double  x,
double  y 
)

Returns x to the power of y.

Referenced by MAP::invResolution(), and MAP::resolution().

double atan ( double  x)

Returns the arctangent of x.

double ceil ( double  x)

Returns x rounded toward -inf to integral value.

double frexp ( double  x,
int *  eptr 
)

for non-zero x x = frexp(arg,&exp); return a double fp quantity x such that 0.5 <= |x| <1.0 and the corresponding binary exponent "exp". That is arg = x*2^exp. If arg is inf, 0.0, or NaN, then frexp(arg,&exp) returns arg with *exp=0.

int isnan ( double  x)

Returns 1 if x is Not a Number. 0 otherwise.

int isinf ( double  x)

Returns 1 if x is Infinite. 0 otherwise.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines