floating_point_consistency.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #include "num_common.h"
00044 #include "floating_point_consistency.h"
00045
00046 namespace lass
00047 {
00048 namespace num
00049 {
00050
00051 #define LASS_NUM_FLOATING_POINT_CONSISTENCY_DEFINE_NUMTRAITS(type)\
00052 const int NumTraits< Consistent< type > >::memorySize = sizeof(Consistent< type >);\
00053 const Consistent< type > NumTraits< Consistent< type > >::one = Consistent< type >(NumTraits< type >::one);\
00054 const Consistent< type > NumTraits< Consistent< type > >::zero = Consistent< type >(NumTraits< type >::zero);\
00055 const Consistent< type > NumTraits< Consistent< type > >::qNaN = Consistent< type >(NumTraits< type >::qNaN);\
00056 const Consistent< type > NumTraits< Consistent< type > >::sNaN = Consistent< type >(NumTraits< type >::sNaN);\
00057 const Consistent< type > NumTraits< Consistent< type > >::infinity = Consistent< type >(NumTraits< type >::infinity);\
00058 const Consistent< type > NumTraits< Consistent< type > >::epsilon = Consistent< type >(NumTraits< type >::epsilon);\
00059 const Consistent< type > NumTraits< Consistent< type > >::min = Consistent< type >(NumTraits< type >::min);\
00060 const Consistent< type > NumTraits< Consistent< type > >::max = Consistent< type >(NumTraits< type >::max);\
00061 const Consistent< type > NumTraits< Consistent< type > >::minStrictPositive = Consistent< type >(NumTraits< type >::minStrictPositive);\
00062 const Consistent< type > NumTraits< Consistent< type > >::pi = Consistent< type >(NumTraits< type >::pi);\
00063 const Consistent< type > NumTraits< Consistent< type > >::e = Consistent< type >(NumTraits< type >::e);\
00064 const Consistent< type > NumTraits< Consistent< type > >::sqrt2 = Consistent< type >(NumTraits< type >::sqrt2);\
00065 const Consistent< type > NumTraits< Consistent< type > >::sqrtPi = Consistent< type >(NumTraits< type >::sqrtPi);
00066
00067 LASS_NUM_FLOATING_POINT_CONSISTENCY_DEFINE_NUMTRAITS(float)
00068 LASS_NUM_FLOATING_POINT_CONSISTENCY_DEFINE_NUMTRAITS(double)
00069 LASS_NUM_FLOATING_POINT_CONSISTENCY_DEFINE_NUMTRAITS(long double)
00070
00071 }
00072 }
00073
00074