/[GiNaC]/ginac/numeric.h
ViewVC logotype

Diff of /ginac/numeric.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.26 by frink, Mon Feb 21 20:11:42 2000 UTC revision 1.34 by kreckel, Mon Jun 5 09:45:21 2000 UTC
# Line 83  class numeric : public basic Line 83  class numeric : public basic
83      friend const numeric atanh(const numeric & x);      friend const numeric atanh(const numeric & x);
84      friend const numeric zeta(const numeric & x);      friend const numeric zeta(const numeric & x);
85      friend const numeric bernoulli(const numeric & n);      friend const numeric bernoulli(const numeric & n);
86        friend const numeric fibonacci(const numeric & n);
87      friend numeric abs(const numeric & x);      friend numeric abs(const numeric & x);
88      friend numeric mod(const numeric & a, const numeric & b);      friend numeric mod(const numeric & a, const numeric & b);
89      friend numeric smod(const numeric & a, const numeric & b);      friend numeric smod(const numeric & a, const numeric & b);
# Line 131  public: Line 132  public:
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;
# Line 187  public: Line 189  public:
189      int to_int(void) const;      int to_int(void) const;
190      long to_long(void) const;      long to_long(void) const;
191      double to_double(void) const;      double to_double(void) const;
192      numeric real(void) const;      const numeric real(void) const;
193      numeric imag(void) const;      const numeric imag(void) const;
194      numeric numer(void) const;      const numeric numer(void) const;
195      numeric denom(void) const;      const numeric denom(void) const;
196      int int_length(void) const;      int int_length(void) const;
197    
198  // member variables  // member variables
# Line 231  const numeric asinh(const numeric & x); Line 233  const numeric asinh(const numeric & x);
233  const numeric acosh(const numeric & x);  const numeric acosh(const numeric & x);
234  const numeric atanh(const numeric & x);  const numeric atanh(const numeric & x);
235  const numeric zeta(const numeric & x);  const numeric zeta(const numeric & x);
236  const numeric gamma(const numeric & x);  const numeric lgamma(const numeric & x);
237    const numeric tgamma(const numeric & x);
238  const numeric psi(const numeric & x);  const numeric psi(const numeric & x);
239  const numeric psi(const numeric & n, const numeric & x);  const numeric psi(const numeric & n, const numeric & x);
240  const numeric factorial(const numeric & n);  const numeric factorial(const numeric & n);
# Line 253  numeric isqrt(const numeric & x); Line 256  numeric isqrt(const numeric & x);
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); }
# Line 267  inline numeric pow(const numeric & x, co Line 263  inline numeric pow(const numeric & x, co
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)
# Line 306  inline bool is_cinteger(const numeric & Line 302  inline bool is_cinteger(const numeric &
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 EulerGammaEvalf(void);  ex EulerEvalf(void);
321  ex CatalanEvalf(void);  ex CatalanEvalf(void);
322    
323    

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.34

Christian Bauer">Christian Bauer
ViewVC Help
Powered by ViewVC 1.1.15