4 #define PI_FLOAT 3.141592653589793f
7 #define PI 3.1415926535897932384626433832795028841971693993751
11 #define MIN(X,Y) ((X)<(Y)?(X):(Y))
15 #define MAX(X,Y) ((X)>(Y)?(X):(Y))
22 /*--------------------------------------*\
24 \*-------------------------------------*/
28 /*--------------------------------------*\
30 \*-------------------------------------*/
34 /*--------------------------------------*\
36 \*-------------------------------------*/
43 * Relatif au max(x1,x2)
45 static bool isEquals(float x1
, float x2
, float epsilon
= 0);
49 * epsilon pas de valeur par default, sinon meme signature que autre methode (overload)
51 static bool isEquals(float a
, float b
, float reference
, float epsilon
); //
54 * Relatif, un a un (au max des 2)
55 * Hyp: tab de meme size n
57 static bool isEquals(float* tabA
, float* tabB
, int n
, float epsilon
= 0);
60 * Relatif par rapport au max de la série
61 * Hyp: tab de meme size n
63 static bool isEqualsRelatifMax(float* tabA
, float* tabB
, int n
, float epsilon
= 0);
70 * Relatif au max(x1,x2)
72 static bool isEquals(double x1
, double x2
, double epsilon
= 0);
82 static bool isEquals(long x1
, long x2
);
88 static bool isPower2(long i
);
89 static bool isPower2(int i
);
90 static bool isPower2(unsigned int i
);
94 /*--------------------------------------*\
96 \*-------------------------------------*/
98 static float maxAbs(float a
, float b
);
101 * Hyp: tab de meme size n
103 static float maxAbs(float* tabA
, float* tabB
, int n
);
105 /*--------------------------------------*\
107 \*-------------------------------------*/