Main Page   Compound List   File List   Compound Members   File Members  

math.h

Go to the documentation of this file.
00001 /*
00002    math.h - mathematical functions
00003 
00004    Author : Michael Stumpf
00005             Michael.Stumpf@t-online.de
00006 
00007    __ATTR_CONST__ added by marekm@linux.org.pl for functions
00008    that "do not examine any values except their arguments, and have
00009    no effects except the return value", for better optimization by gcc.
00010  */
00011 
00012 #ifndef __MATH_H
00013 #define __MATH_H
00014 
00015 #define M_PI 3.141592653589793238462643
00016 #define M_SQRT2 1.4142135623730950488016887
00017 
00018 #ifndef __ATTR_CONST__
00019 #define __ATTR_CONST__ __attribute__((__const__))
00020 #endif
00021 
00022 extern double cos(double) __ATTR_CONST__;
00023 extern double fabs(double) __ATTR_CONST__;
00024 #if 0
00025 /* fabs seems to be built in already */
00026 extern inline double fabs( double __x )
00027   { double __res;
00028     __asm__ __volatile__ ("andi %D0,0x7F \n\t"
00029                 : "=d" (__res) : "0" (__x) );
00030     return __res;
00031   }
00032 #endif
00033 extern double fmod(double, double) __ATTR_CONST__;
00034 extern double modf(double, double *);
00035 extern double sin(double) __ATTR_CONST__;
00036 extern double sqrt(double) __ATTR_CONST__;
00037 extern double tan(double) __ATTR_CONST__;
00038 extern double floor(double) __ATTR_CONST__;
00039 extern double ceil(double) __ATTR_CONST__;
00040 extern double frexp(double, int *);
00041 extern double ldexp(double,int) __ATTR_CONST__;
00042 extern double exp(double) __ATTR_CONST__;
00043 extern double cosh(double) __ATTR_CONST__;
00044 extern double sinh(double) __ATTR_CONST__;
00045 extern double tanh(double) __ATTR_CONST__;
00046 extern double acos(double) __ATTR_CONST__;
00047 extern double asin(double) __ATTR_CONST__;
00048 extern double atan(double) __ATTR_CONST__;
00049 extern double atan2(double, double) __ATTR_CONST__;
00050 extern double log(double) __ATTR_CONST__;
00051 extern double log10(double) __ATTR_CONST__;
00052 extern double pow(double, double) __ATTR_CONST__;
00053 extern double strtod(const char *s, char **endptr);
00054 
00055 /* non-standard functions */
00056 extern double square(double) __ATTR_CONST__;
00057 extern double inverse(double) __ATTR_CONST__;
00058 
00059 #endif /* _MATH_H */
00060 

Generated at Fri Jul 19 14:55:41 2002 for avrgcc by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001