
Boost : 
Subject: Re: [boost] boost interval arithmetic
From: AsbjÃ¸rn (lordcrc_at_[hidden])
Date: 20150115 07:08:51
On 15.01.2015 12:22, ÐŸÐ°Ð²ÐµÐ» ÐšÑƒÐ´Ð°Ð½ wrote:
>
> But at any comparison mode arithmetic functions must return correct result.
This[1] article mentions the following:
"There is, however, no consensus on interval division.
In most expositions, interval division, X/Y , is only defined under the
condition that 0 not be contained in Y."
"Interval computation involving division has to be a compromise between
information gain, computational efficiency, and program complexity."
"For efficiency in computation, one may choose to represent
sets of reals by a single closed interval. This can be simply
achieved by replacing <a, b> / <c, d> by the least interval con
taining it. For the example above this would yield the inter
val <âˆ’âˆž, +âˆž>. Another choice would be to represent this
quotient as a finite union of closed intervals, which would
result in more information but also a greater cost in storage
and processing for the operation. For the example above,
this would yield <âˆ’âˆž, 0> âˆª <1, +âˆž>, which captures all infor
mation except for the openness of the right endpoint of the
first interval."
I'm not very familiar with interval arithmetics, but I do work with some
algorithms where it could be useful and as such have been looking into it some.
A policy for how to handle divisions seems like a good compromise if it's not
too difficult to implement, ie current behavior vs throw in cases where the
result should technically be a union of intervals.
[1]:
http://fab.cba.mit.edu/classes/S62.12/docs/Hickey_interval.pdf
 AsbjÃ¸rn
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk