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

Re: P1788 input/output



On 2013-07-22 10:59:31 -0400, Michel Hack wrote:
> This gets us back to "recoverable representations" which I had brought
> up a number of times in the past.  The problem here is that one has to
> record or remember (a) the original type, and (b) the fact that this
> was indeed the result of intervalToRecoverable() -- because recovery
> will have to apply compatible rounding to recover the original interval.
> One of the conversion directions is likely to (technically) violate
> the containment rule, so one always has to be mindful of context.  Both
> intervalToRecoverable() and recoverableToInterval() could use to-nearest,
> or one could use outward rounding and the other inward rounding.

The primary goal of recovery is to use the same type. Then there's the
question of whether you want to allow exact2interval to be applied on
a different type. If yes, then I agree that one needs to require an
exact representation. For instance, if exact2interval is applied on
a different type, it shall either return an exact result or raise a
language- or implementation-defined exception.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)