has_float128.cpp 510 B

1234567891011121314151617181920212223
  1. // Copyright John Maddock 2013.
  2. // Use, modification and distribution are subject to the
  3. // Boost Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. #include <boost/config.hpp>
  6. #ifndef BOOST_HAS_FLOAT128
  7. #error "This doesn't work unless Boost.Config enables __float128 support"
  8. #endif
  9. extern "C" {
  10. #include <quadmath.h>
  11. }
  12. int main()
  13. {
  14. __float128 f = -2.0Q;
  15. f = fabsq(f);
  16. f = expq(f);
  17. return 0;
  18. }