ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 15 Oct 2012 13:15:10 -0500interface to MPFIhttps://ask.sagemath.org/question/9431/interface-to-mpfi/Thanks to the Sage team for providing an interface to the MPFI package for arbitrary precision interval arithmetic. It looks like the MPFI version used in Sage is 1.5.1, the most recent. Reading the included info file mpfi.info, there are references to additional functionality such as extended interval division, which would be useful for implementing extended interval Newton and related numerical methods. I can't tell if this is available in MPFI 1.5.1 and does not yet have a wrapper in Sage (not complaining!), or will only be "available soon" in MPFI as the file states.
Since I can't find any information at any MPFI site (Mon français n'est pas très bon), does anyone know if or when the extended interval arithmetic functions will be implemented in MPFI? And this looks like it would be quite a job to get into Sage as well. For example, currently:
1./RIF(-1.,1.)
[-infinity .. +infinity]
The extended interval division of this would be the (sharper bound) union of two intervals:
[-infinity .. -1] <union> [1 .. +infinity]
which would seem to require a data structure to hold multiple RIF objects. A numerical algorithm can then detect this split, perform iterations on both parts, and (ideally) find all solutions to the original problem without multiple starting points. This could get messier in higher dimensions since multiple intervals now become multiple boxes, cubes, and hypercubes.
I see that MPFI or something does solve systems of equations over RIF:
A = matrix([[RIF(2,2.1), RIF(1,1.1)],[RIF(1,1.1),RIF(2,2.0)]]); A
[2.1? 1.1?]
[1.1? 2]
b = vector([RIF(1,1.1),RIF(1,1.1)]); b
(1.1?, 1.1?)
x = A\b
x[0].endpoints()
(0.230244068953746, 0.426562500000001)
x[1].endpoints()
(0.259218749999999, 0.447175285884964)
which is very nice, but also breaks down if the determinant of the matrix is an interval that includes 0, resulting in all infinities for the solution. There is an entire area of numerical linear algebra now devoted to solving these problems, which I'm interested in implementing. I might be able to handle the extended interval arithmetic with my own generalized Python classes, but it's better to use whatever standards are being developed.
Mon, 15 Oct 2012 13:15:10 -0500https://ask.sagemath.org/question/9431/interface-to-mpfi/