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
---------------------------------------------------------------