Changeset 7800:5184e5015a4c
- Timestamp:
- 12/06/07 13:58:39 (5 years ago)
- Branch:
- default
- File:
-
- 1 edited
-
sage/calculus/calculus.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sage/calculus/calculus.py
r7788 r7800 1997 1997 There is also a function \code{numerical_integral} that implements 1998 1998 numerical integration using the GSL C library. It is potentially 1999 much faster and applies to arbitrary user defined functions. 1999 much faster and applies to arbitrary user defined functions. 2000 2001 Also, there are limits to the precision that Maxima can compute 2002 the integral to due to limitations in quadpack. 2003 2004 sage: f = x 2005 sage: f = f.nintegral(x,0,1,1e-14) 2006 Traceback (most recent call last): 2007 ... 2008 ValueError: Maxima (via quadpack) cannot compute the integral to that precision 2000 2009 2001 2010 EXAMPLES: … … 2049 2058 syntax. 2050 2059 """ 2051 v = self._maxima_().quad_qags(var(x), 2060 try: 2061 v = self._maxima_().quad_qags(var(x), 2052 2062 a, b, desired_relative_error, 2053 2063 maximum_num_subintervals) 2064 except TypeError, err: 2065 if "ERROR NUMBER = 6" in str(err): 2066 raise ValueError, "Maxima (via quadpack) cannot compute the integral to that precision" 2067 else: 2068 raise TypeError, err 2069 2054 2070 return float(v[0]), float(v[1]), Integer(v[2]), Integer(v[3]) 2055 2071
Note: See TracChangeset
for help on using the changeset viewer.
