int numeric::compare_same_type(basic const & other) const
{
- ASSERT(is_exactly_of_type(other, numeric));
+ GINAC_ASSERT(is_exactly_of_type(other, numeric));
numeric const & o = static_cast<numeric &>(const_cast<basic &>(other));
if (*value == *o.value) {
bool numeric::is_equal_same_type(basic const & other) const
{
- ASSERT(is_exactly_of_type(other,numeric));
+ GINAC_ASSERT(is_exactly_of_type(other,numeric));
numeric const *o = static_cast<numeric const *>(&other);
return is_equal(*o);
* if the number is really an integer before calling this method. */
int numeric::to_int(void) const
{
- ASSERT(is_integer());
+ GINAC_ASSERT(is_integer());
return cl_I_to_int(The(cl_I)(*value));
}
* if the number is really not complex before calling this method. */
double numeric::to_double(void) const
{
- ASSERT(is_real());
+ GINAC_ASSERT(is_real());
return cl_double_approx(realpart(*value));
}
/** Numerator. Computes the numerator of rational numbers, rationalized
* numerator of complex if real and imaginary part are both rational numbers
- * (i.e numer(4/3+5/6*I) == 8+5*I), the number itself in all other cases. */
+ * (i.e numer(4/3+5/6*I) == 8+5*I), the number carrying the sign in all other
+ * cases. */
numeric numeric::numer(void) const
{
if (is_integer()) {