Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
2 // Copyright Daniel James 2005-2006. Use, modification, and distribution are
3 // subject to the Boost Software License, Version 1.0. (See accompanying
4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved.
8 #if !defined(BOOST_FUNCTIONAL_DETAIL_FLOAT_FUNCTIONS_HPP)
9 #define BOOST_FUNCTIONAL_DETAIL_FLOAT_FUNCTIONS_HPP
13 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
17 // The C++ standard requires that the C float functions are overloarded
18 // for float, double and long double in the std namespace, but some of the older
19 // library implementations don't support this. On some that don't, the C99
20 // float functions (frexpf, frexpl, etc.) are available.
22 // Some of this is based on guess work. If I don't know any better I assume that
23 // the standard C++ overloaded functions are available. If they're not then this
24 // means that the argument is cast to a double and back, which is inefficient
25 // and will give pretty bad results for long doubles - so if you know better
29 #if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
30 # if (defined(__GNUC__) && __GNUC__ < 3 && (defined(linux) || defined(__linux) || defined(__linux__))) || defined(__DMC__)
31 # define BOOST_HASH_USE_C99_FLOAT_FUNCS
32 # elif defined(BOOST_MSVC) && BOOST_MSVC < 1300
33 # define BOOST_HASH_USE_C99_FLOAT_FUNCS
35 # define BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS
40 // On borland 5.51, with roguewave 2.1.1 the standard C++ overloads aren't
41 // defined, but for the same version of roguewave on sunpro they are.
42 #elif defined(_RWSTD_VER)
43 # if defined(__BORLANDC__)
44 # define BOOST_HASH_USE_C99_FLOAT_FUNCS
45 # define BOOST_HASH_C99_NO_FLOAT_FUNCS
46 # elif defined(__DECCXX)
47 # define BOOST_HASH_USE_C99_FLOAT_FUNCS
49 # define BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS
52 // libstdc++ (gcc 3.0 onwards, I think)
53 #elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
54 # define BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS
57 #elif defined(__STL_CONFIG_H)
58 # if defined(linux) || defined(__linux) || defined(__linux__)
59 # define BOOST_HASH_USE_C99_FLOAT_FUNCS
61 # define BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS
65 #elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
66 // Overloaded float functions were probably introduced in an earlier version
68 # if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 402)
69 # define BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS
71 # define BOOST_HASH_USE_C99_FLOAT_FUNCS
75 #elif defined(__DMC__)
76 # define BOOST_HASH_USE_C99_FLOAT_FUNCS
78 // Use overloaded float functions by default.
80 # define BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS
88 inline float call_ldexp(float v, int exp)
91 #if defined(BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS) || \
92 defined(BOOST_HASH_C99_NO_FLOAT_FUNCS)
95 return ldexpf(v, exp);
99 inline double call_ldexp(double v, int exp)
102 return ldexp(v, exp);
105 #ifndef __SYMBIAN32__
106 inline long double call_ldexp(long double v, int exp)
109 #if defined(BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS)
110 return ldexp(v, exp);
112 return ldexpl(v, exp);
117 inline float call_frexp(float v, int* exp)
120 #if defined(BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS) || \
121 defined(BOOST_HASH_C99_NO_FLOAT_FUNCS)
122 return frexp(v, exp);
124 return frexpf(v, exp);
128 inline double call_frexp(double v, int* exp)
131 return frexp(v, exp);
135 #ifndef __SYMBIAN32__
136 inline long double call_frexp(long double v, int* exp)
139 #if defined(BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS)
140 return frexp(v, exp);
142 return frexpl(v, exp);
149 #if defined(BOOST_HASH_USE_C99_FLOAT_FUNCS)
150 #undef BOOST_HASH_USE_C99_FLOAT_FUNCS
153 #if defined(BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS)
154 #undef BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS
157 #if defined(BOOST_HASH_C99_NO_FLOAT_FUNCS)
158 #undef BOOST_HASH_C99_NO_FLOAT_FUNCS