sign.hpp 894 B

123456789101112131415161718192021222324252627282930
  1. /*=============================================================================
  2. Copyright (c) 2001-2014 Joel de Guzman
  3. Copyright (c) 2001-2011 Hartmut Kaiser
  4. http://spirit.sourceforge.net/
  5. Distributed under the Boost Software License, Version 1.0. (See accompanying
  6. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. =============================================================================*/
  8. #if !defined(BOOST_SPIRIT_X3_SIGN_MAR_11_2009_0734PM)
  9. #define BOOST_SPIRIT_X3_SIGN_MAR_11_2009_0734PM
  10. #include <boost/math/special_functions/sign.hpp>
  11. namespace boost { namespace spirit { namespace x3
  12. {
  13. template<typename T>
  14. inline bool (signbit)(T x)
  15. {
  16. return (boost::math::signbit)(x) ? true : false;
  17. }
  18. template<typename T>
  19. inline T (changesign)(T x)
  20. {
  21. return (boost::math::changesign)(x);
  22. }
  23. }}}
  24. #endif