7 #include "../parser/parser.h"
8 #include "operations.h"
9 #include "typetraits.h"
11 namespace boost {
namespace spirit {
namespace traits {
12 #if BOOST_VERSION >= 105900
13 template<>
inline bool scale(
int exp, cln::cl_I& r, cln::cl_I rin) {
15 r = rin *
carl::pow(cln::cl_I(10),
static_cast<unsigned>(
exp));
20 template<>
inline bool scale(
int exp, cln::cl_RA& r, cln::cl_RA rin) {
22 r = rin *
carl::pow(cln::cl_RA(10),
static_cast<unsigned>(
exp));
24 r = rin /
carl::pow(cln::cl_RA(10),
static_cast<unsigned>(-
exp));
28 template<>
inline void scale(
int exp, cln::cl_I& r) {
30 r *=
carl::pow(cln::cl_I(10),
static_cast<unsigned>(
exp));
34 template<>
inline void scale(
int exp, cln::cl_RA& r) {
36 r *=
carl::pow(cln::cl_RA(10),
static_cast<unsigned>(
exp));
38 r /=
carl::pow(cln::cl_RA(10),
static_cast<unsigned>(-
exp));
41 #if BOOST_VERSION < 107000
42 template<>
inline bool is_equal_to_one(
const cln::cl_I& value) {
45 template<>
inline bool is_equal_to_one(
const cln::cl_RA& value) {
Interval< Number > exp(const Interval< Number > &i)
Interval< Number > div(const Interval< Number > &_lhs, const Interval< Number > &_rhs)
Implements the division which assumes that there is no remainder.
Interval< Number > pow(const Interval< Number > &i, Integer exp)
bool is_one(const Interval< Number > &i)
Check if this interval is a point-interval containing 1.