32 #ifndef INCLUDED_FROM_NUMBERS_H
33 static_assert(
false,
"This file may only be included indirectly by numbers.h");
39 #include <type_traits>
41 #include "../interval/typetraits.h"
46 template<
typename T,
typename U =
47 typename std::remove_cv<
48 typename std::remove_pointer<
49 typename std::remove_reference<
50 typename std::remove_extent<
82 #define TRAIT_TRUE(name,type,groups) \
84 template<> struct name<type>: std::true_type {};
86 #define TRAIT_FALSE(name,type,groups) \
88 template<> struct name<type>: std::false_type {};
90 #define TRAIT_TYPE(name,_type,value,groups) \
92 template<> struct name<_type>: carl::has_subtype<value> {};
99 template<
typename IntegerT>
103 class UnivariatePolynomial;
105 template<
typename C,
typename O,
typename P>
106 class MultivariatePolynomial;
108 template<
typename T>
struct is_rational_type;
109 template<
typename T>
struct is_subset_of_rationals_type;
132 struct is_field_type: std::integral_constant<bool, is_rational_type<T>::value> {};
153 struct is_finite_type: std::integral_constant<bool, std::is_fundamental<T>::value> {};
177 struct is_float_type: std::integral_constant<bool, std::is_floating_point<T>::value> {};
218 template<
typename Type>
293 template<
typename type>
309 template<
typename RationalType>
355 template<
typename T,
typename T2>
357 return std::numeric_limits<T>::min() <= t && t <= std::numeric_limits<T>::max();
States if a type is a field.
States if a type represents only a finite domain.
States if a type is a floating point type.
States if a type is an integer type.
States if a type represents a subset of all integers.
Gives the underlying number type of a complex object.
carl is the main namespace for the library.
bool fits_within(const T2 &t)
typename std::enable_if<!std::is_same< C, typename IntegralType< C >::type >::value, typename IntegralType< C >::type >::type IntegralTypeIfDifferent
Galois Field numbers, i.e.
This template is designed to provide types that are related to other types.
T type
A type associated with the type.
States if a type is a rational type.
States if a type represents a subset of all rationals and the representation is similar to a rational...
static constexpr bool value
Default value of this trait.
States if a type is a number type.
static const bool value
Default value of this trait.
Type trait for the characteristic of the given field (template argument).
Gives the corresponding integral type.
PreventConversion(const T &_other)