| 132 |
ex eval(int level=0) const; |
ex eval(int level=0) const; |
| 133 |
ex evalf(int level=0) const; |
ex evalf(int level=0) const; |
| 134 |
ex normal(lst &sym_lst, lst &repl_lst, int level=0) const; |
ex normal(lst &sym_lst, lst &repl_lst, int level=0) const; |
| 135 |
|
ex to_rational(lst &repl_lst) const; |
| 136 |
numeric integer_content(void) const; |
numeric integer_content(void) const; |
| 137 |
ex smod(const numeric &xi) const; |
ex smod(const numeric &xi) const; |
| 138 |
numeric max_coefficient(void) const; |
numeric max_coefficient(void) const; |
| 256 |
numeric gcd(const numeric & a, const numeric & b); |
numeric gcd(const numeric & a, const numeric & b); |
| 257 |
numeric lcm(const numeric & a, const numeric & b); |
numeric lcm(const numeric & a, const numeric & b); |
| 258 |
|
|
|
/** Exception thrown by numeric members to signal failure */ |
|
|
struct numeric_fail |
|
|
{ |
|
|
int failval; |
|
|
numeric_fail(int n) { failval = n; } |
|
|
}; |
|
|
|
|
| 259 |
// wrapper functions around member functions |
// wrapper functions around member functions |
| 260 |
inline numeric pow(const numeric & x, const numeric & y) |
inline numeric pow(const numeric & x, const numeric & y) |
| 261 |
{ return x.power(y); } |
{ return x.power(y); } |
| 263 |
inline numeric inverse(const numeric & x) |
inline numeric inverse(const numeric & x) |
| 264 |
{ return x.inverse(); } |
{ return x.inverse(); } |
| 265 |
|
|
| 266 |
inline bool csgn(const numeric & x) |
inline int csgn(const numeric & x) |
| 267 |
{ return x.csgn(); } |
{ return x.csgn(); } |
| 268 |
|
|
| 269 |
inline bool is_zero(const numeric & x) |
inline bool is_zero(const numeric & x) |
| 302 |
inline bool is_crational(const numeric & x) |
inline bool is_crational(const numeric & x) |
| 303 |
{ return x.is_crational(); } |
{ return x.is_crational(); } |
| 304 |
|
|
| 305 |
inline numeric real(const numeric & x) |
inline const numeric real(const numeric & x) |
| 306 |
{ return x.real(); } |
{ return x.real(); } |
| 307 |
|
|
| 308 |
inline numeric imag(const numeric & x) |
inline const numeric imag(const numeric & x) |
| 309 |
{ return x.imag(); } |
{ return x.imag(); } |
| 310 |
|
|
| 311 |
inline numeric numer(const numeric & x) |
inline const numeric numer(const numeric & x) |
| 312 |
{ return x.numer(); } |
{ return x.numer(); } |
| 313 |
|
|
| 314 |
inline numeric denom(const numeric & x) |
inline const numeric denom(const numeric & x) |
| 315 |
{ return x.denom(); } |
{ return x.denom(); } |
| 316 |
|
|
| 317 |
// numeric evaluation functions for class constant objects: |
// numeric evaluation functions for class constant objects: |
| 318 |
|
|
| 319 |
ex PiEvalf(void); |
ex PiEvalf(void); |
| 320 |
ex gammaEvalf(void); |
ex EulerEvalf(void); |
| 321 |
ex CatalanEvalf(void); |
ex CatalanEvalf(void); |
| 322 |
|
|
| 323 |
|
|