text: //==============================================================================
  //         Copyright 2003 - 2011 LASMEA UMR 6602 CNRS/Univ. Clermont II
  //         Copyright 2009 - 2011 LRI    UMR 8623 CNRS/Univ Paris Sud XI
  //
  //          Distributed under the Boost Software License, Version 1.0.
  //                 See accompanying file LICENSE.txt or copy at
  //                     http://www.boost.org/LICENSE_1_0.txt
  //==============================================================================
  #ifndef NT2_EXPONENTIAL_FUNCTIONS_SCALAR_POW_HPP_INCLUDED
  #define NT2_EXPONENTIAL_FUNCTIONS_SCALAR_POW_HPP_INCLUDED
  
  #include <nt2/exponential/functions/pow.hpp>
  #include <nt2/include/functions/scalar/is_flint.hpp>
  #include <nt2/include/functions/scalar/is_ltz.hpp>
  #include <nt2/include/functions/scalar/is_odd.hpp>
  #include <nt2/include/functions/scalar/pow_abs.hpp>
  #include <nt2/include/functions/scalar/rec.hpp>
  #include <nt2/include/constants/nan.hpp>
  #include <nt2/sdk/meta/as_unsigned.hpp>
  
  namespace nt2 { namespace ext
  {
    BOOST_DISPATCH_IMPLEMENT  ( pow_, tag::cpu_
                              , (A0)
                              , (scalar_< floating_<A0> >)
                                (scalar_< floating_<A0> >)
                              )
    {
      typedef A0 result_type;
  
      NT2_FUNCTOR_CALL_REPEAT(2)
      {
        bool ltza0 = is_ltz(a0);
        if( (ltza0 && !is_flint(a1)) ) return Nan<A0>();
        A0 z = pow_abs(a0, a1);
        return  (ltza0 && nt2::is_odd(a1)) ? -z : z;
      }
    };
  } }
  #endif
  