Subject: Re: [boost] boost interval arithmetic
From: AsbjÃ¸rn (lordcrc_at_[hidden])
Date: 2015-01-15 07:08:51
On 15.01.2015 12:22, ÐÐ°Ð²ÐµÐ» ÐÑÐ´Ð°Ð½ wrote:
> But at any comparison mode arithmetic functions must return correct result.
This 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
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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk