- numeric add(numeric const & other) const;
- numeric sub(numeric const & other) const;
- numeric mul(numeric const & other) const;
- numeric div(numeric const & other) const;
- numeric power(numeric const & other) const;
- numeric const & add_dyn(numeric const & other) const;
- numeric const & sub_dyn(numeric const & other) const;
- numeric const & mul_dyn(numeric const & other) const;
- numeric const & div_dyn(numeric const & other) const;
- numeric const & power_dyn(numeric const & other) const;
- numeric const & operator=(int i);
- numeric const & operator=(unsigned int i);
- numeric const & operator=(long i);
- numeric const & operator=(unsigned long i);
- numeric const & operator=(double d);
- numeric const & operator=(char const * s);
- /*
- numeric add_dyn(numeric const & other) const { return add(other); }
- numeric sub_dyn(numeric const & other) const { return sub(other); }
- numeric mul_dyn(numeric const & other) const { return mul(other); }
- numeric div_dyn(numeric const & other) const { return div(other); }
- numeric power_dyn(numeric const & other) const { return power(other); }
- */
- numeric inverse(void) const;
- int csgn(void) const;
- int compare(numeric const & other) const;
- bool is_equal(numeric const & other) const;
- bool is_zero(void) const;
- bool is_positive(void) const;
- bool is_negative(void) const;
- bool is_integer(void) const;
- bool is_pos_integer(void) const;
- bool is_nonneg_integer(void) const;
- bool is_even(void) const;
- bool is_odd(void) const;
- bool is_prime(void) const;
- bool is_rational(void) const;
- bool is_real(void) const;
- bool operator==(numeric const & other) const;
- bool operator!=(numeric const & other) const;
- bool operator<(numeric const & other) const;
- bool operator<=(numeric const & other) const;
- bool operator>(numeric const & other) const;
- bool operator>=(numeric const & other) const;
- int to_int(void) const;
- double to_double(void) const;
- numeric real(void) const;
- numeric imag(void) const;
- numeric numer(void) const;
- numeric denom(void) const;
- int int_length(void) const;
+ const numeric add(const numeric &other) const;
+ const numeric sub(const numeric &other) const;
+ const numeric mul(const numeric &other) const;
+ const numeric div(const numeric &other) const;
+ const numeric power(const numeric &other) const;
+ const numeric & add_dyn(const numeric &other) const;
+ const numeric & sub_dyn(const numeric &other) const;
+ const numeric & mul_dyn(const numeric &other) const;
+ const numeric & div_dyn(const numeric &other) const;
+ const numeric & power_dyn(const numeric &other) const;
+ const numeric & operator=(int i);
+ const numeric & operator=(unsigned int i);
+ const numeric & operator=(long i);
+ const numeric & operator=(unsigned long i);
+ const numeric & operator=(double d);
+ const numeric & operator=(const char *s);
+ const numeric inverse() const;
+ numeric step() const;
+ int csgn() const;
+ int compare(const numeric &other) const;
+ bool is_equal(const numeric &other) const;
+ bool is_zero() const;
+ bool is_positive() const;
+ bool is_negative() const;
+ bool is_integer() const;
+ bool is_pos_integer() const;
+ bool is_nonneg_integer() const;
+ bool is_even() const;
+ bool is_odd() const;
+ bool is_prime() const;
+ bool is_rational() const;
+ bool is_real() const;
+ bool is_cinteger() const;
+ bool is_crational() const;
+ bool operator==(const numeric &other) const;
+ bool operator!=(const numeric &other) const;
+ bool operator<(const numeric &other) const;
+ bool operator<=(const numeric &other) const;
+ bool operator>(const numeric &other) const;
+ bool operator>=(const numeric &other) const;
+ int to_int() const;
+ long to_long() const;
+ double to_double() const;
+ cln::cl_N to_cl_N() const;
+ const numeric real() const;
+ const numeric imag() const;
+ const numeric numer() const;
+ const numeric denom() const;
+ int int_length() const;
+ // converting routines for interfacing with CLN:
+ explicit numeric(const cln::cl_N &z);
+
+protected:
+ void print_numeric(const print_context & c, const char *par_open, const char *par_close, const char *imag_sym, const char *mul_sym, unsigned level) const;
+ void do_print(const print_context & c, unsigned level) const;
+ void do_print_latex(const print_latex & c, unsigned level) const;
+ void do_print_csrc(const print_csrc & c, unsigned level) const;
+ void do_print_csrc_cl_N(const print_csrc_cl_N & c, unsigned level) const;
+ void do_print_tree(const print_tree & c, unsigned level) const;
+ void do_print_python_repr(const print_python_repr & c, unsigned level) const;