Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: Announcing the Moore library for interval arithmetic



Dear all,

I received an email message from a member 
of the list questioning whether I could change
some points in the library in order to
make it more conforming with the standard.

  The simple answer is: yes, I will accept
suggestions and change the library in
points in which do not alter its essence.
For instance, I can provide two versions
of many functions, a slightly slower
confirming to the standard and a 
"raw" one, which does things different
from the standard in some cases.

   In all fairness, there cases in which
I am not sure that the "faster" version
will be actually any faster than the the 
standard one. And I did consider this in the past.

   A point in which I do not plan to change 
the library is in its support for decorations, 
simply because I don't like the idea. 

   However, I respect people who  do like
decorations and there is a "SIMPLE WAY" 
around this.  I would be glad to help
programmers with enough patience to try it.
In C++, it would be "JUST A QUESTION OF.." 
writing a class

template <Interval I>
class DecInterval
{

   I interval
   Dec decoration.
};

This class could actually work with
ANY Interval class I, like boost's
for instance, and simplify the work
of people trying to write libraries 
which would be fully compliant with
the standard. 

People used to writing soffware are
well aware that "SIMPLE WAY"s,
"JUST A QUESTION OF.. " and "ANY.."
can easily become a nightmare, 
but if there are any volunteers willing
to try this I could help with advice,
ideas. and the code of the Moore
library. I just don't have the time
to do the coding.

   Any candidates?

                 regards,

                         walter.

On Wed, Nov 30, 2016 at 2:55 PM, Ralph Baker Kearfott <rbk5287@xxxxxxxxxxxxx> wrote:
Walter et al,

Ah, yes.  The reasons you gave for not implementing all of 1788
are strongly reminiscent of reasons for not fully implementing
754-2008 or, for that matter, various programming language
standards, namely efficiency and ease of implementation.

I'm guessing you are meeting 1788 accuracy requirements
in the 754-binding.

We do have reference implementations of 1788, and users
can decide which is best for them.  Future standardization
work can take account of that.

Baker


On 11/29/2016 08:15 AM, Walter Mascarenhas wrote:
Ralph,

   There are also a differences regarding
empty and unbounded intervals and the
signs of zero, but other than that, yes,
I implemented standard operations for bare intervals,
I also implemented operations involving numbers and
intervals (I don`t know why they were not considered by
the standard.)

   All of my choices had reasons: I did not follow
the standard only in cases in which it would lead
worse code.    For instance, In C++ forcing the
return of the sup  function to be -oo or +0  has bad
consequences. Besides the introduction of if statements,
it would force me to return a copy of the sup
instead of a reference to it. Therefore, I decided
to return NaN for the sup and inf of empty and
leave undefined the sign of zero.

  In fact, in my opinion, the standard should not
specify the signs of the returned zeros (and
of course other people think otherwise and
voted for the consideration of the sign of zero.
It is a free world...)

   Another example is the difference in the cancel
minus function: I returrn what some people in the list
call "the inward minus" This agrees with the standard
modulo empty and unbounded intervals.

  In summary, it would be fair to say that I
"implemented the standard operations for common
bare intervals, except for the sign of zero",
for common in the sense of
the standard`s function isCommonInterval. For
uncommon intervals, or functions returning 0,
I believe that my results
are reasonable, but they may not agree with
the standard.

             walter.





On Tue, Nov 29, 2016 at 11:08 AM, Ralph Baker Kearfott
<rbk5287@xxxxxxxxxxxxx <mailto:rbk5287@xxxxxxxxxxxxx>> wrote:

    Walter,

    So, basically, have you implemented standard operations
    with "bare" intervals?

    Baker


    On 11/29/2016 04:06 AM, Walter Mascarenhas wrote:

        Dear all,

             I finally found the time to complete an interval arithmetic
        library in which I have been working for some time (by
        completing I mean having the code, a manual and
        about 1000 tests)

            This message contains a copy of the manual and an
        article about the library. You can obtain the code by
        sending me an email message (I would like to estimate
        the size of the set of people which would ever look
        at it, to know if it is not empty for instance)

          The library is open source, and I will send you
        the source code.

           It is quite likely that the manual has silly typos,
        that it is unclear, and that my English can be improved.
        So I would like to hear your comments about it.
        The code may still have bugs too and I will be glad
        to correct them.

         At first, I started to write a library which would be
        fully compliant with the IEEE standard. However,
        along the way I changed my mind. For instance,
        I concluded that decorations are not useful for the
        applications that I have in mind
        and decided not to support them.
        There are some other points in
        which the library does not comply to the standard
        (which are mentioned in the manual.)

          Please do not take this lack of compliance as
        an attack on the standard. I do believe that it
        is a valid effort and my library benefited a lot
        from it.

           Finally, as a result of my experience, I would
        like to make one suggestion: why not to provide
        a simplified simplified version of the standard
        which does not contemplate decorations?
        I believe this simplified simplified standard would
        be enough for the vast majority of users and
        would be much easier to implement (test,
        maintain and document.)

                 regards,

                             walter.







    --

    ---------------------------------------------------------------
    Ralph Baker Kearfott,   rbk@xxxxxxxxxxxxx
    <mailto:rbk@xxxxxxxxxxxxx>   (337) 482-5346
    <tel:%28337%29%20482-5346> (fax)
    (337) 482-5270 <tel:%28337%29%20482-5270> (work)
     (337) 993-1827 <tel:%28337%29%20993-1827> (home)
    URL: http://interval.louisiana.edu/kearfott.html
    <http://interval.louisiana.edu/kearfott.html>
    Department of Mathematics, University of Louisiana at Lafayette
    (Room 217 Maxim D. Doucet Hall, 1403 Johnston Street)
    Box 4-1010, Lafayette, LA 70504-1010, USA
    ---------------------------------------------------------------




--

---------------------------------------------------------------
Ralph Baker Kearfott,   rbk@xxxxxxxxxxxxx   (337) 482-5346 (fax)
(337) 482-5270 (work)                     (337) 993-1827 (home)
URL: http://interval.louisiana.edu/kearfott.html
Department of Mathematics, University of Louisiana at Lafayette
(Room 217 Maxim D. Doucet Hall, 1403 Johnston Street)
Box 4-1010, Lafayette, LA 70504-1010, USA
---------------------------------------------------------------