blob: 36c0424931545feb55c5552a705f7df72767c2ac (
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/types/tuple.hpp"
#include "pythonic/utils/functor.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);
}
} // namespace math
PYTHONIC_NS_END
#endif
|