Opened 13 years ago
Last modified 7 years ago
#5993 new enhancement
document use of interval arithmetic
Reported by: | was | Owned by: | mvngu |
---|---|---|---|
Priority: | minor | Milestone: | sage-6.4 |
Component: | documentation | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
This email snippet pretty much describes the issue:
On Tue, May 5, 2009 at 11:16 PM, Henryk Trappmann <bo198214@googlemail.com> wrote: > > Ah now I see, you mean though it displays 1/384 it is internally still > the above sum, which is computed when evaluated with n. True. In Sage right now the internal form of the expression (not the simplified form) is used by the "n" command. This will change when Sage switches from using maxima-based symbolics to Pynac. By the way, you can use the real interval field to get a floating point approximation to any symbolic expression to a given number of digits of precision. Every digit is definitely right except the one right before the question mark: sage: a = 1/(48*sqrt(1)) - 7/(96*1**(3/2)) + 3/(32*1**(5/2)) - 5/ (128*1**(7/2)) sage: RealIntervalField(100)(a) # increase 100 for more digits 0.002604166666666666666666666667? I think the n function (numerical_approx) for symbolics should be changed to using interval arithmetic. This will be a huge improvement. Notice, e.g., that interval arithmetic very nicely gives the right answer for the infamous sin(10^50): sage: a = sin(10^50) sage: a.n(53) -0.480500143493759 sage: a.n(100) 0.60974154556722786199645650055 sage: RealIntervalField(100)(a) 0.? sage: RealIntervalField(1000)(a) -0.7896724934293100827102895399174077539600834046214027191457808736221899969800609898633436757589688470442999273506152178357769064871103469499564331175635613221319397479785737324994506546860108913238488404198306006819757685879489185272089985858148036954222175628785469474395231359019098600625732453528693? sage: RealIntervalField(2000)(a) -0.78967249342931008271028953991740775396008340462140271914578087362218999698006098986334367575896884704429992735061521783577690648711034694995643311756356132213193974797857373249945065468601089132384884041983060068197576858794891852720899858581480369542221756287854694743952313590190986006257324535286926640214204183176856658976160340849634781130568053474154330242776565926107540133198976420887112928640131582614537425282391078909233424580311555104358881651194953182665408243214532152322603956371555619997139323527489307648072219268176687894373677502675114853503742816202001868587837402822439060931321957?
Change History (6)
comment:1 Changed 11 years ago by
- Priority changed from major to minor
- Report Upstream set to N/A
comment:2 Changed 9 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:3 Changed 8 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:4 Changed 8 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:5 Changed 8 years ago by
- Milestone changed from sage-6.3 to sage-6.4
comment:6 Changed 7 years ago by
- Component changed from calculus to documentation
- Owner changed from burcin to mvngu
- Summary changed from rewrite numerical_approx (the n function) to use interval arithmetic to document use of interval arithmetic
Note: See
TracTickets for help on using
tickets.
Disagree, primarily because it's been this way for quite a while now, and because a lot of users would be really confused by the question mark. We certainly could update the documentation to make it clear how to get much more accurate answers using RIF.