1 | initial version |
Ball arithmetics and interval arithmetics serve the same purpose: computing with high-precision floating-point numbers with a guaranteed bound on the approximation error that remains correct along the computation.
So to understand the difference, it is better to work with, say, 1000 bits of precision, not 10.
In interval arithmetics, numbers are represented with an interval whose endpoints have 1000 bits of precision. So, for the computation of the sinus of an interval that contains pi/2
, it makes sense to say that the upper point of the image is 1 (so that the computation of this endpoint is both very fast and accurate).
In ball arithmetics, numbers are represented with a ball whose center has 1000 bits of precision, but the radius has only 30 bits of precision: when the precision is high, the computation is twice as fast as for interval arithmetics, and you do not want to sacrifice that advantage. So, to compute the image of a ball by a function, the image of the center is computed with high precision and an estimation of the error is made to compute the radius.
Now, imagine that we want to achieve the behaviour you are expecting, that is that the image of the ball that contains pi/2
has its right endpoint equal to 1: this implies that you will have to shift the center accordingly, which requires an additional compuration with 1000 bits of precision. Moreover, since both the radius and 1 can be expressed with 30 bits of precision, if you want the right side of the ball to be exactly 1, it will imply that the new center and the left side of the ball will also be exprimable with 30 bits of precision, which might imply a loss of precision of that side (not completely sure, you should make the computation to get convinced).
Basically, the upper
and lower
methods are meaningful for interval arithmetics, while for ball arithmetics, the interesing methods are center
and rad
.
You can also have a look at the thematic tutorial about the representations of real and complex numbers proposed at https://trac.sagemath.org/ticket/15944
2 | No.2 Revision |
Ball arithmetics and interval arithmetics serve the same purpose: computing with high-precision floating-point numbers with a guaranteed bound on the approximation error that which remains correct along the computation.
So to understand the difference, it is better to work with, say, 1000 bits of precision, not 10.
In interval arithmetics, numbers are represented with an interval whose endpoints have 1000 bits of precision. So, for the computation of the sinus of an interval that contains pi/2
, it makes sense to say that the upper point of the image is 1 (so that the computation of this endpoint is both very fast and accurate).
In ball arithmetics, numbers are represented with a ball whose center has 1000 bits of precision, but the radius has only 30 bits of precision: when the precision is high, the computation is twice as fast as for interval arithmetics, and you do not want to sacrifice that advantage. So, to compute the image of a ball by a function, the image of the center is computed with high precision and an estimation of the error is made to compute the radius.
Now, imagine that we want to achieve the behaviour you are expecting, that is that the image of the ball that contains pi/2
has its right endpoint equal to 1: this implies that you will have to shift the center accordingly, which requires an additional compuration with 1000 bits of precision. Moreover, since both the radius and 1 can be expressed with 30 bits of precision, if you want the right side of the ball to be exactly 1, it will imply that the new center and the left side of the ball will also be exprimable with 30 bits of precision, which might imply a loss of precision of that side (not completely sure, you should make the computation to get convinced).
Basically, the upper
and lower
methods are meaningful for interval arithmetics, while for ball arithmetics, the interesing methods are center
and rad
.
You can also have a look at the thematic tutorial about the representations of real and complex numbers proposed at https://trac.sagemath.org/ticket/15944
3 | No.3 Revision |
Ball arithmetics and interval arithmetics serve the same purpose: computing with high-precision floating-point numbers with a guaranteed bound on the approximation error which remains correct along the computation.
So to understand the difference, it is better to work with, say, 1000 bits of precision, not 10.
In interval arithmetics, numbers are represented with an interval whose endpoints have 1000 bits of precision. So, for the computation of the sinus of an interval that contains pi/2
, it makes sense to say that the upper point of the image is 1 (so that the computation of this endpoint is both very fast and accurate).
In ball arithmetics, numbers are represented with a ball whose center has 1000 bits of precision, but the radius has only 30 bits of precision: when the precision is high, the computation is twice as fast as for interval arithmetics, and you do not want to sacrifice that advantage. So, to compute the image of a ball by a function, the image of the center is computed with high precision and an estimation of the error is made to compute the radius.
Now, imagine that we want to achieve the behaviour you are expecting, that is that the image of the a ball that contains pi/2
has its right endpoint equal to 1: this implies that you will have to shift the center accordingly, which requires an additional compuration with 1000 bits of precision. Moreover, since both the radius and 1 can be expressed with 30 bits of precision, if you want the right side of the ball to be exactly 1, it will imply that the new center and the left side of the ball will also be exprimable with 30 bits of precision, which might imply a loss of precision of that side (not completely sure, you should make the computation to get convinced).
Basically, the upper
and lower
methods are meaningful for interval arithmetics, while for ball arithmetics, the interesing methods are center
and rad
.
You can also have a look at the thematic tutorial about the representations of real and complex numbers proposed at https://trac.sagemath.org/ticket/15944