aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/pythran/pythran/pythonic/math/frexp.hpp
blob: 2a694c703df6d6d15f8b073b7b97644f87434ae3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef PYTHONIC_MATH_FREXP_HPP
#define PYTHONIC_MATH_FREXP_HPP

#include "pythonic/include/math/frexp.hpp"

#include "pythonic/utils/functor.hpp"
#include "pythonic/types/tuple.hpp"

#include <cmath>

PYTHONIC_NS_BEGIN

namespace math
{
  std::tuple<double, long> frexp(double x)
  {
    int exp;
    double sig = std::frexp(x, &exp);
    return std::tuple<double, long>(sig, exp);
  }
}
PYTHONIC_NS_END

#endif